def test_handle_deferred(self):
        now = time.time()
        ret = [0]

        for i in xrange(10):
            import sys
            # sys.stderr.write("Registering deferred %i" % i)
            @self.station.register_deferred
            @defer_until(now / 30)
            def thunk():
                ret[0] += 1

        self.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/operator `-` -> `/`