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(), and wasSuccessful().

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() and testOutcome() hooks.

addExpectedFailure(test, err)[source]

Test case resulted in expected failure.

Fires setTestOutcome() and testOutcome() hooks.

addFailure(test, err)[source]

Test case resulted in failure.

Fires setTestOutcome() and testOutcome() hooks.

addSkip(test, reason)[source]

Test case was skipped.

Fires setTestOutcome() and testOutcome() hooks.

addSuccess(test)[source]

Test case resulted in success.

Fires setTestOutcome() and testOutcome() hooks.

addUnexpectedSuccess(test)[source]

Test case resulted in unexpected success.

Fires setTestOutcome() and testOutcome() hooks.

startTest(test)[source]

Start a test case.

Fires startTest() hook.

stop()[source]

Stop test run.

Fires resultStop() hook, and sets self.shouldStop to event.shouldStop.

stopTest(test)[source]

Stop a test case.

Fires stopTest() hook.

wasSuccessful()[source]

Was test run successful?

Fires wasSuccessful() hook, and returns event.success.