Use pytest markers to configure test suite
Following the discussion in !1331 (comment 950468), we may want to consider using pytest markers to manage the different parts of the test suite as an alternative to what is currently done in the setup.cfg
.
!1331 (merged) shows an example of this, and adds --skip-roqs
as an optional flag for skipping tests marked as requires_roqs
. The usage is
pytest --skip-roqs
This could include, for example, marking integration and slow integrations tests using the pytest-integration
package: https://pypi.org/project/pytest-integration/ or marking GW-related tests.
Looking at what we have currently:
addopts =
--ignore test/import_test.py
--ignore test/integration/other_test.py
--ignore test/integration/example_test.py
--ignore test/integration/sample_from_the_prior_test.py
--ignore test/gw/plot_test.py
--ignore test/integration/sampler_run_test.py
It seems the following could be options:
- Integration tests
- Plotting tests
- Sampler run tests
- import tests
What do folks think?