twisted.internet.testing.MemoryReactorClock(MemoryReactor, Clock) class documentationtwisted.internet.testing
(View In Hierarchy)
Known subclasses: twisted.trial._dist.test.test_disttrial.CountingReactor
| Method | __init__ | Initialize the tracking lists. | 
Inherited from MemoryReactor:
| Instance Variable | hasInstalled | Keeps track of whether this reactor has been installed. (type: bool) | 
| Instance Variable | running | Keeps track of whether this reactor is running. (type: bool) | 
| Instance Variable | hasStopped | Keeps track of whether this reactor has been stopped. (type: bool) | 
| Instance Variable | hasCrashed | Keeps track of whether this reactor has crashed. (type: bool) | 
| Instance Variable | whenRunningHooks | Keeps track of hooks registered with callWhenRunning. (type:list) | 
| Instance Variable | triggers | Keeps track of hooks registered with addSystemEventTrigger. (type:dict) | 
| Instance Variable | tcpClients | Keeps track of connection attempts (ie, calls to connectTCP). (type:list) | 
| Instance Variable | tcpServers | Keeps track of server listen attempts (ie, calls to listenTCP). (type:list) | 
| Instance Variable | sslClients | Keeps track of connection attempts (ie, calls to connectSSL). (type:list) | 
| Instance Variable | sslServers | Keeps track of server listen attempts (ie, calls to listenSSL). (type:list) | 
| Instance Variable | unixClients | Keeps track of connection attempts (ie, calls to connectUNIX). (type:list) | 
| Instance Variable | unixServers | Keeps track of server listen attempts (ie, calls to listenUNIX). (type:list) | 
| 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. | 
| Method | install | Fake install callable to emulate reactor module installation. | 
| Method | resolve | Not implemented; raises NotImplementedError. | 
| Method | run | No summary | 
| Method | stop | Fake IReactorCore.run.
Setsself.runningtoFalse.
Setsself.hasStoppedtoTrue. | 
| Method | crash | Fake IReactorCore.crash.
Setsself.runningtoNone,
because that feels crashy. Setsself.hasCrashedtoTrue. | 
| Method | iterate | Not implemented; raises NotImplementedError. | 
| Method | fireSystemEvent | Not implemented; raises NotImplementedError. | 
| Method | addSystemEventTrigger | Fake IReactorCore.run.
Keep track of trigger by appending it to 
self.triggers[phase][eventType]. | 
| Method | removeSystemEventTrigger | Not implemented; raises NotImplementedError. | 
| Method | callWhenRunning | Fake IReactorCore.callWhenRunning.
Keeps a list of invocations to make inself.whenRunningHooks. | 
| Method | adoptStreamPort | Fake IReactorSocket.adoptStreamPort,
that logs the call and returns anIListeningPort. | 
| Method | adoptStreamConnection | Record the given stream connection in adoptedStreamConnections. | 
| Method | adoptDatagramPort | Fake IReactorSocket.adoptDatagramPort,
that logs the call and returns a fakeIListeningPort. | 
| Method | listenTCP | Fake IReactorTCP.listenTCP,
that logs the call and returns anIListeningPort. | 
| Method | connectTCP | Fake IReactorTCP.connectTCP,
that logs the call and returns anIConnector. | 
| Method | listenSSL | Fake IReactorSSL.listenSSL,
that logs the call and returns anIListeningPort. | 
| Method | connectSSL | Fake IReactorSSL.connectSSL,
that logs the call and returns anIConnector. | 
| Method | listenUNIX | Fake IReactorUNIX.listenUNIX,
that logs the call and returns anIListeningPort. | 
| Method | connectUNIX | Fake IReactorUNIX.connectUNIX,
that logs the call and returns anIConnector. | 
| Method | addReader | Fake IReactorFDSet.addReaderwhich adds the reader to a local set. | 
| Method | removeReader | Fake IReactorFDSet.removeReaderwhich removes the reader from a local set. | 
| Method | addWriter | Fake IReactorFDSet.addWriterwhich adds the writer to a local set. | 
| Method | removeWriter | Fake IReactorFDSet.removeWriterwhich removes the writer from a local set. | 
| Method | getReaders | Fake IReactorFDSet.getReaderswhich returns a list of readers from the local set. | 
| Method | getWriters | Fake IReactorFDSet.getWriterswhich returns a list of writers from the local set. | 
| Method | removeAll | Fake IReactorFDSet.removeAllwhich removed all readers and writers from the local sets. | 
Inherited from Clock:
| Method | seconds | Pretend to be time.time().  This is used internally when an operation 
such as IDelayedCall.resetneeds to determine a time value relative to the current time. | 
| Method | callLater | See twisted.internet.interfaces.IReactorTime.callLater. | 
| Method | getDelayedCalls | See twisted.internet.interfaces.IReactorTime.getDelayedCalls | 
| Method | advance | Move time on this clock forward by the given amount and run whatever pending calls should be run. | 
| Method | pump | Advance incrementally by the given set of times. | 
| Method | _sortCalls | Sort the pending calls according to the time they are scheduled. | 
Initialize the tracking lists.