class SystemEventTestsBuilder(ReactorBuilder): (source)
Builder defining tests relating to IReactorCore.addSystemEventTrigger
and IReactorCore.fireSystemEvent
.
Method | test_call |
Functions are run in the order that they were passed to reactor.callWhenRunning . |
Method | test |
reactor.crash() stops the reactor and does not fire shutdown triggers. |
Method | test |
reactor.iterate() does not block. |
Method | test_multiple |
reactor.run() raises ReactorAlreadyRunning when called when the reactor is already running. |
Method | test_run |
reactor.run() restarts the reactor after it has been stopped by reactor.crash(). |
Method | test_run |
reactor.run() raises ReactorNotRestartable when called when the reactor is being run after getting stopped priorly. |
Method | test_running |
The reactor is not running when "before" "startup" triggers are called and is running when "during" and "after" "startup" triggers are called. |
Method | test_run |
When there is a 'before' 'startup' trigger which returns an unfired Deferred , reactor.run() starts the reactor and does not return until after reactor.stop() is called |
Method | test_shutdown |
A IFileDescriptor.connectionLost implementation which raises an exception does not prevent the remaining IFileDescriptor s from having their connectionLost method called. |
Method | test_shutdown |
"before" "shutdown" triggers are not run synchronously from reactor.stop . |
Method | test_signal |
Signal handlers are installed in responsed to the "during" "startup". |
Method | test_stop |
reactor.stop() fires all three phases of shutdown event triggers before it makes reactor.run() return. |
Method | test_stop |
reactor.stop() raises RuntimeError when called after the reactor has been stopped. |
Method | test_stop |
reactor.stop() raises RuntimeError when called when the reactor has not been started. |
Inherited from ReactorBuilder
:
Class Method | make |
Create a SynchronousTestCase subclass which mixes in cls for each known reactor and return a dict mapping their names to them. |
Method | build |
Create and return a reactor using self.reactorFactory. |
Method | get |
Determine how long to run the test before considering it failed. |
Method | run |
Run the reactor for at most the given amount of time. |
Method | set |
Clear the SIGCHLD handler, if there is one, to ensure an environment like the one which exists prior to a call to reactor.run . |
Method | tear |
Restore the original SIGCHLD handler and reap processes as long as there seem to be any remaining. |
Method | unbuild |
Clean up any resources which may have been allocated for the given reactor by its creation or by a test which used it. |
Class Variable | required |
A list of interfaces which the reactor must provide or these tests will be skipped. The default, None , means that no interfaces are required. |
Class Variable | skipped |
A dict mapping FQPN strings of reactors for which the tests defined by this class will be skipped to strings giving the skip message. |
Instance Variable | original |
The SIGCHLD handler which was installed when setUp ran and which will be re-installed when tearDown runs. |
Instance Variable | reactor |
A no-argument callable which returns the reactor to use for testing. |
Instance Variable | _reactors |
A list of FQPN strings giving the reactors for which SynchronousTestCase s will be created. |
reactor.run() raises ReactorNotRestartable
when called when the reactor is being run after getting stopped priorly.
The reactor is not running when "before" "startup" triggers are called and is running when "during" and "after" "startup" triggers are called.
When there is a 'before' 'startup' trigger which returns an unfired Deferred
, reactor.run() starts the reactor and does not return until after reactor.stop() is called
A IFileDescriptor.connectionLost
implementation which raises an exception does not prevent the remaining IFileDescriptor
s from having their connectionLost method called.
reactor.stop() fires all three phases of shutdown event triggers before it makes reactor.run() return.