# nose2.result

class nose2.result.PluggableTestResult(session)

  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)

    Test case resulted in error.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addExpectedFailure(test, err)

    Test case resulted in expected failure.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addFailure(test, err)

    Test case resulted in failure.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addSkip(test, reason)

    Test case was skipped.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addSubTest(test, subtest, err)

    Called at the end of a subtest.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addSuccess(test)

    Test case resulted in success.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  addUnexpectedSuccess(test)

    Test case resulted in unexpected success.

    Fires `setTestOutcome()` and `testOutcome()` hooks.

  startTest(test)

    Start a test case.

    Fires `startTest()` hook.

  stop()

    Stop test run.

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

  stopTest(test)

    Stop a test case.

    Fires `stopTest()` hook.

  wasSuccessful()

    Was test run successful?

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