# eric7.DebugClients.Python.DCTestResult

Module implementing a TestResult derivative for the eric debugger.

### Global Attributes

None

### Classes

DCTestResult | A TestResult derivative to work with eric's debug client.

### Functions

None

## DCTestResult

A TestResult derivative to work with eric's debug client.

For more details see unittest.py of the standard python distribution.

### Derived from

TestResult

### Class Attributes

None

### Class Methods

None

### Methods

DCTestResult | Constructor
addError | Public method called if a test errored.
addExpectedFailure | Public method called if a test failed expected.
addFailure | Public method called if a test failed.
addSkip | Public method called if a test was skipped.
addSubTest | Public method called for each subtest to record its result.
addUnexpectedSuccess | Public method called if a test succeeded expectedly.
startTest | Public method called at the start of a test.
stopTest | Public method called at the end of a test.

### Static Methods

None

#### DCTestResult (Constructor)

DCTestResult(dbgClient, failfast)

Constructor

dbgClient (DebugClientBase)
  reference to the debug client
failfast (bool)
  flag indicating to stop at the first error

#### DCTestResult.addError

addError(test, err)

Public method called if a test errored.

test
  Reference to the test object
err
  The error traceback

#### DCTestResult.addExpectedFailure

addExpectedFailure(test, err)

Public method called if a test failed expected.

test
  reference to the test object
err
  error traceback

#### DCTestResult.addFailure

addFailure(test, err)

Public method called if a test failed.

test
  Reference to the test object
err
  The error traceback

#### DCTestResult.addSkip

addSkip(test, reason)

Public method called if a test was skipped.

test
  reference to the test object
reason
  reason for skipping the test (string)

#### DCTestResult.addSubTest

addSubTest(test, subtest, err)

Public method called for each subtest to record its result.

test
  reference to the test object
subtest
  reference to the subtest object
err
  error traceback

#### DCTestResult.addUnexpectedSuccess

addUnexpectedSuccess(test)

Public method called if a test succeeded expectedly.

test
  reference to the test object

#### DCTestResult.startTest

startTest(test)

Public method called at the start of a test.

test
  Reference to the test object

#### DCTestResult.stopTest

stopTest(test)

Public method called at the end of a test.

test
  Reference to the test object

Up