# eric7.Testing.Interfaces.UnittestExecutor

Module implementing the executor for the standard 'unittest' framework.

### Global Attributes

None

### Classes

UnittestExecutor | Class implementing the executor for the standard 'unittest' framework.

### Functions

None

## UnittestExecutor

Class implementing the executor for the standard 'unittest' framework.

### Derived from

TestExecutorBase

### Class Attributes

module
name
runner

### Class Methods

None

### Methods

UnittestExecutor | Constructor
__processData | Private slot to process the received data.
createArguments | Public method to create the arguments needed to start the test process.
finished | Public method handling the unit test process been finished.
getVersions | Public method to get the test framework version and version information of its installed plugins.
hasCoverage | Public method to get the test framework version and version information of its installed plugins.
start | Public method to start the testing process.
supportsPatterns | Public method to indicate the support for test filtering using test name patterns or a test name pattern expression.

### Static Methods

None

#### UnittestExecutor (Constructor)

UnittestExecutor(testWidget)

Constructor

testWidget (TestingWidget)
  reference to the unit test widget

#### UnittestExecutor.__processData

__processData(data)

Private slot to process the received data.

data (dict)
  data object received

#### UnittestExecutor.createArguments

createArguments(config)

Public method to create the arguments needed to start the test process.

config (TestConfig)
  configuration for the test execution

Return:
  list of process arguments

Return Type:
  list of str

#### UnittestExecutor.finished

finished()

Public method handling the unit test process been finished.

This method should read the results (if necessary) and emit the signal testFinished.

#### UnittestExecutor.getVersions

getVersions(interpreter)

Public method to get the test framework version and version information of its installed plugins.

interpreter (str)
  interpreter to be used for the test

Return:
  dictionary containing the framework name and version and the list of available plugins with name and version each

Return Type:
  dict

#### UnittestExecutor.hasCoverage

hasCoverage(interpreter)

Public method to get the test framework version and version information of its installed plugins.

interpreter (str)
  interpreter to be used for the test

Return:
  flag indicating the availability of coverage functionality

Return Type:
  bool

#### UnittestExecutor.start

start(config, pythonpath)

Public method to start the testing process.

config (TestConfig)
  configuration for the test execution
pythonpath (list of str)
  list of directories to be added to the Python path

#### UnittestExecutor.supportsPatterns

supportsPatterns(interpreter)

Public method to indicate the support for test filtering using test name patterns or a test name pattern expression.

interpreter (str)
  interpreter to be used for the test

Return:
  flag indicating support of markers

Return Type:
  bool

Up