def test_withCountIntervalZero(self):
        """
        L{task.LoopingCall.withCount} with interval set to 0
        will call the countCallable 1.
        """
        clock = task.Clock()
        accumulator = []

        def foo(cnt):
            accumulator.append(cnt)
            if len(accumulator) > 4:
                loop.stop()

        loop = task.LoopingCall.withCount(foo)
        loop.clock = clock
        deferred = loop.start(0, now=False)

        clock.advance(0)
        self.successResultOf(deferred)

        self.assertEqual([1, 1, 1, 1, 1], accumulator)

        L{task.LoopingCall.withCount} with interval set to 0
        will call the countCallable 1.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_task.py