class documentation

A fake reactor that counts the calls to IReactorCore.run, IReactorCore.stop, and IReactorProcess.spawnProcess.

Method __init__ Initialize the tracking lists.
Method run See IReactorCore.run.
Method spawnProcess See IReactorProcess.spawnProcess.
Method stop See IReactorCore.stop.
Class Variable runCount Undocumented
Class Variable spawnCount Undocumented
Class Variable stopCount Undocumented
Instance Variable hasRun Undocumented
Instance Variable running A bool which is True from during startup to during shutdown and False the rest of the time.
Instance Variable _workers Undocumented

Inherited from MemoryReactor (via MemoryReactorClock):

Method addReader Fake IReactorFDSet.addReader which adds the reader to a local set.
Method addSystemEventTrigger Fake IReactorCore.run. Keep track of trigger by appending it to self.triggers[phase][eventType].
Method addWriter Fake IReactorFDSet.addWriter which adds the writer to a local set.
Method adoptDatagramPort Fake IReactorSocket.adoptDatagramPort, that logs the call and returns a fake IListeningPort.
Method adoptStreamConnection Record the given stream connection in adoptedStreamConnections.
Method adoptStreamPort Fake IReactorSocket.adoptStreamPort, that logs the call and returns an IListeningPort.
Method callWhenRunning Fake IReactorCore.callWhenRunning. Keeps a list of invocations to make in self.whenRunningHooks.
Method connectSSL Fake IReactorSSL.connectSSL, that logs the call and returns an IConnector.
Method connectTCP Fake IReactorTCP.connectTCP, that logs the call and returns an IConnector.
Method connectUNIX Fake IReactorUNIX.connectUNIX, that logs the call and returns an IConnector.
Method crash Fake IReactorCore.crash. Sets self.running to None, because that feels crashy. Sets self.hasCrashed to True.
Method fireSystemEvent Not implemented; raises NotImplementedError.
Method getReaders Fake IReactorFDSet.getReaders which returns a list of readers from the local set.
Method getWriters Fake IReactorFDSet.getWriters which returns a list of writers from the local set.
Method install Fake install callable to emulate reactor module installation.
Method iterate Not implemented; raises NotImplementedError.
Method listenSSL Fake IReactorSSL.listenSSL, that logs the call and returns an IListeningPort.
Method listenTCP Fake IReactorTCP.listenTCP, that logs the call and returns an IListeningPort.
Method listenUNIX Fake IReactorUNIX.listenUNIX, that logs the call and returns an IListeningPort.
Method removeAll Fake IReactorFDSet.removeAll which removed all readers and writers from the local sets.
Method removeReader Fake IReactorFDSet.removeReader which removes the reader from a local set.
Method removeSystemEventTrigger Not implemented; raises NotImplementedError.
Method removeWriter Fake IReactorFDSet.removeWriter which removes the writer from a local set.
Method resolve Not implemented; raises NotImplementedError.
Instance Variable adoptedPorts Keeps track of server listen attempts (ie, calls to adoptStreamPort).
Instance Variable adoptedStreamConnections Keeps track of stream-oriented connections added using adoptStreamConnection.
Instance Variable connectors Undocumented
Instance Variable hasCrashed Keeps track of whether this reactor has crashed.
Instance Variable hasInstalled Keeps track of whether this reactor has been installed.
Instance Variable hasStopped Keeps track of whether this reactor has been stopped.
Instance Variable readers Undocumented
Instance Variable sslClients Keeps track of connection attempts (ie, calls to connectSSL).
Instance Variable sslServers Keeps track of server listen attempts (ie, calls to listenSSL).
Instance Variable tcpClients Keeps track of connection attempts (ie, calls to connectTCP).
Instance Variable tcpServers Keeps track of server listen attempts (ie, calls to listenTCP).
Instance Variable triggers Keeps track of hooks registered with addSystemEventTrigger.
Instance Variable unixClients Keeps track of connection attempts (ie, calls to connectUNIX).
Instance Variable unixServers Keeps track of server listen attempts (ie, calls to listenUNIX).
Instance Variable whenRunningHooks Keeps track of hooks registered with callWhenRunning.
Instance Variable writers Undocumented

Inherited from Clock (via MemoryReactorClock, MemoryReactor):

Method advance Move time on this clock forward by the given amount and run whatever pending calls should be run.
Method callLater See twisted.internet.interfaces.IReactorTime.callLater.
Method getDelayedCalls See twisted.internet.interfaces.IReactorTime.getDelayedCalls
Method pump Advance incrementally by the given set of times.
Method seconds Pretend to be time.time(). This is used internally when an operation such as IDelayedCall.reset needs to determine a time value relative to the current time.
Class Variable rightNow Undocumented
Instance Variable calls Undocumented
Method _sortCalls Sort the pending calls according to the time they are scheduled.
def __init__(self, workers):

Initialize the tracking lists.

def spawnProcess(self, workerProto, executable, args=(), env={}, path=None, uid=None, gid=None, usePTY=0, childFDs=None):

See IReactorProcess.spawnProcess.

Parameters
workerProtoSee IReactorProcess.spawnProcess.
executableUndocumented
argsSee IReactorProcess.spawnProcess.
envUndocumented
pathUndocumented
uidUndocumented
gidUndocumented
usePTYUndocumented
childFDsUndocumented
kwargsSee IReactorProcess.spawnProcess.
runCount: int =

Undocumented

spawnCount: int =

Undocumented

stopCount: int =

Undocumented

hasRun: bool =
running: bool =

A bool which is True from during startup to during shutdown and False the rest of the time.

_workers =

Undocumented