def test_cleanPendingCancelsCalls(self):
        def func():
            return "Lulz"
        cancelled = []
        delayedCall = DelayedCall(300, func, (), {},
                                  cancelled.append, lambda x: None)
        reactor = StubReactor([delayedCall])
        jan = _Janitor(None, None, reactor=reactor)
        jan._cleanPending()
        self.assertEquals(cancelled, [delayedCall])
During pending-call cleanup, the janitor cancels pending timed calls.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_util.py/JanitorTests.test_cleanPendingCancelsCalls