def gen():
    when = (yield)
    self.assertAlmostEqual(0.01, when)
    when = (yield 0.01)
    self.assertAlmostEqual(0.02, when)
    (yield 0.01)
def gen():
    when = (yield)
    self.assertAlmostEqual(0.01, when)
    when = (yield 0.01)
    self.assertAlmostEqual(0.02, when)
    (yield 0.01)