nose2.result¶
- class nose2.result.PluggableTestResult(session)[source]¶
Test result that defers to plugins.
All test outcome recording and reporting is deferred to plugins, which are expected to implement
startTest()
,stopTest()
,testOutcome()
, andwasSuccessful()
.- Parameters:
session – Test run session.
- shouldStop¶
When
True
, test run should stop before running another test.
- addError(test, err)[source]¶
Test case resulted in error.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- addExpectedFailure(test, err)[source]¶
Test case resulted in expected failure.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- addFailure(test, err)[source]¶
Test case resulted in failure.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- addSkip(test, reason)[source]¶
Test case was skipped.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- addSuccess(test)[source]¶
Test case resulted in success.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- addUnexpectedSuccess(test)[source]¶
Test case resulted in unexpected success.
Fires
setTestOutcome()
andtestOutcome()
hooks.
- startTest(test)[source]¶
Start a test case.
Fires
startTest()
hook.
- stop()[source]¶
Stop test run.
Fires
resultStop()
hook, and setsself.shouldStop
toevent.shouldStop
.
- stopTest(test)[source]¶
Stop a test case.
Fires
stopTest()
hook.
- wasSuccessful()[source]¶
Was test run successful?
Fires
wasSuccessful()
hook, and returnsevent.success
.