# Stopping After the First Error or Failure

Stop the test run after the first error or failure.

This plugin implements `testOutcome()` and sets `event.result.shouldStop` if it sees an outcome with exc_info that is not expected.

## Command-line options

-F DEFAULT, --fail-fast DEFAULT

  Stop the test run after the first error or failure

## Plugin class reference: FailFast

class nose2.plugins.failfast.FailFast(*args, **kwargs)

  Stop the test run after error or failure

  resultCreated(event)

    Mark new result

  testOutcome(event)

    Stop on unexpected error or failure