Loader: Test Cases

Load tests from unittest.TestCase subclasses.

This plugin implements loadTestsFromName() and loadTestsFromModule() to load tests from unittest.TestCase subclasses found in modules or named on the command line.

Configuration [testcases]

always-on
Default

True

Type

boolean

Sample configuration

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

[testcases]
always-on = True

Plugin class reference: TestCaseLoader

class nose2.plugins.loader.testcases.TestCaseLoader(*args, **kwargs)[source]

Loader plugin that loads from test cases

loadTestsFromModule(event)[source]

Load tests in unittest.TestCase subclasses

loadTestsFromName(event)[source]

Load tests from event.name if it names a test case/method