Loader: load_tests protocol

Loader that implements the load_tests protocol.

This plugin implements the load_tests protocol as detailed in the documentation for unittest2.

See the load_tests protocol documentation for more information.


Test suites using the load_tests protocol do not work correctly with the multiprocess plugin as of nose2 04. This will be fixed in a future release.

Configuration [load_tests]


Sample configuration

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

always-on = True

Plugin class reference: LoadTestsLoader

class nose2.plugins.loader.loadtests.LoadTestsLoader[source]

Loader plugin that implements load_tests.


Run load_tests in packages.

If a package itself matches the test file pattern, run load_tests in its __init__.py, and stop default test discovery for that package.


Run load_tests in a module.

May add to or filter tests loaded in module.