perturbopy.conftest.pytest_generate_tests
- perturbopy.conftest.pytest_generate_tests(metafunc)
The purpose of this function is to feed multiple test names to the tests/test_perturbo.py test_perturbo(test_name) function. Here, this function is referred as ‘metafunc’.
First, we get the list of all of the test folders using the tests/epr_info.yml file. We retrieve the test folder as <epr name>-<test name>. This is done by the get_all_tests() function.
Next, we remove some of the tests based on the command line options and obtain the target test_list using the filer_tests() function.
Finally, we feed the elements of the test_list to the test_perturbo() (metafunction) as the test_name input argument of the function.