Use pytest.fixture
to provide consistent test data across all test modules?
#427
Labels
test-suite
Issue related to testing
We are starting to duplicate a LOT the definition of functions to load data during tests.
It's making things less consistent across tests, and potentially harder to add new test data later on.
I see two options:
conftest.py
(see https://www.testim.io/blog/using-pytest-fixtures/, especially Section "Use Pytest Fixtures Across Multiple Test Files With conftest.py"), potentially parametrizing the fixtures directly if we have several test data: https://docs.pytest.org/en/7.3.x/how-to/fixtures.html#fixture-parametrize,examples.py
, which would be a less steep curve for users and easier to read in tests, but maybe not the most computationally efficient.The text was updated successfully, but these errors were encountered: