How to test LoopingCall()?
Within my code, I use task.LoopingCall() to run some deferred function every second. I want to make sure that that function returns the right values for a certain number of things. So, I thought I could use a task.clock() and call the advance() method on it. However, I am not getting the right number of responses expected. Any idea what I am doing wrong? Here is a test code to show what I mean. First is the server: from twisted.internet.protocol import Factory from twisted.protocols.basic import LineReceiver from twisted.internet import reactor from twisted.internet import task import time