Collections of examples on how to use advanced features of nose2.
This makes use of the attrib plugin.
The groups decorator sets the attributes group or groups in the tests that is decorated. When the tests are run, the attrib plugin will look for those attributes in the tests methods.
run_multiple_group_tests.sh
run_single_group_tests.sh
This makes use of the multiprocess plugin. The concurrency level is set either in the N flag passed to nose2 command or in the nose2 config file.
Beware of this issue: if the extent of the concurrency is greater than the number of tests, your tests will hang. E.g. N=5 but there are only 4 tests, your test run will never exit.
Beware of this issue: if there is any import error you will not be able to see it when mp is on: logging gets swallowed. You need to disable the plugin for debugging.
run_concurrent_tests.sh
This makes use of the params plugin. In the example, test values are stored in a class. Different providers are defined which inject data into the tests.
run_parameterized_tests.sh
The code in this project is distributed under the provision of the Apache License 2.0.