class documentation

class WorkerReporter(TestResult): (source)

View In Hierarchy

Reporter for trial's distributed workers. We send things not through a stream, but through an AMP protocol's callRemote method.
Method __init__
Method add​Error Send an error over.
Method add​Expected​Failure Send an expected failure over.
Method add​Failure Send a Failure over.
Method add​Skip Send a skip over.
Method add​Success Send a success over.
Method add​Unexpected​Success Send an unexpected success over.
Method print​Summary Don't print a summary
Instance Variable amp​Protocol Undocumented
Method _get​Failure Convert a sys.exc_info()-style tuple to a Failure, if necessary.
Method _get​Frames Extract frames from a Failure instance.
Method _get​Todo​Reason Get the reason for a Todo.
Constant _DEFAULT​_TODO Default message for expected failures and unexpected successes, used only if a Todo is not provided.

Inherited from TestResult:

Method __repr__ Undocumented
Method done The test suite has finished running.
Method start​Test This must be called before the given test is commenced.
Method stop​Test This must be called after the given test is completed.
Method was​Successful Report whether or not this test suite was successful or not.
Instance Variable expected​Failures Undocumented
Instance Variable skips Undocumented
Instance Variable successes count the number of successes achieved by the test run.
Instance Variable unexpected​Successes Undocumented
Method _get​Time Undocumented
Instance Variable _last​Time Undocumented
Instance Variable _test​Started Undocumented
Instance Variable _timings Undocumented
def __init__(self, ampProtocol): (source)
Parameters
amp​Protocol:AMPThe communication channel with the trial distributed manager which collects all test results.
def addError(self, test, error): (source)
def addExpectedFailure(self, test, error, todo=None): (source)
def addFailure(self, test, fail): (source)
def addSkip(self, test, reason): (source)
def addSuccess(self, test): (source)
def addUnexpectedSuccess(self, test, todo=None): (source)
def printSummary(self): (source)
Don't print a summary
ampProtocol = (source)

Undocumented

def _getFailure(self, error): (source)
Convert a sys.exc_info()-style tuple to a Failure, if necessary.
def _getFrames(self, failure): (source)
Extract frames from a Failure instance.
def _getTodoReason(self, todo): (source)

Get the reason for a Todo.

If todo is None, return a sensible default.

_DEFAULT_TODO: str = (source)
Default message for expected failures and unexpected successes, used only if a Todo is not provided.
Value
'Test expected to fail'