Collecting tests without running them

This plugin implements startTestRun(), setting a test executor (event.executeTests) that just collects tests without executing them. To do so it calls result.startTest, result.addSuccess and result.stopTest for ech test, without calling the test itself.

Configuration [collect-only]

always-on
Default :False
Type :boolean

Sample configuration

The default configuration is equivalent to including the following in a unittest.cfg file.

[collect-only]
always-on = False

Command-line options

--collect-only DEFAULT

Collect and output test names, do not run any tests

Plugin class reference: CollectOnly

class nose2.plugins.collect.CollectOnly[source]

Collect but don’t run tests

collectTests(suite, result)[source]

Collect tests but don’t run them

startTestRun(event)[source]

Replace event.executeTests