

def test_handle_deferred(self):
    now = time.time()
    ret = [0]
    for i in xrange(10):
        import sys

        @self.station.register_deferred
        @defer_until((now - 30))
        def thunk():
            ret[0] += 1
    i.assertEqual(len(self.station.deferreds), 10)
    self.station.handle_deferreds()
    self.assertEqual(len(self.station.deferreds), 0)
    self.assertEqual(ret[0], 10)

dataset/ETHPy150Open richo/groundstation/test/test_station_deferred.py TestStationDeferreds.test_handle_deferred/VarMisuse@71/80 `self`->`i`