You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have tests in a tests/ directory which requires a certain set of ENV vars
we have tests in a tests_integration directory which requires a different set of ENV vars
We are also using poetry in combination with the pyproject.toml file and when using poetry run pytest it runs the tests in tests/ directory and when using poetry run pytest tests_integration/ it runs the tests in the tests_integration directory.
Let's start with a concrete example of what we want and what currently works.
A summary of our use case:
We are also using
poetry
in combination with the pyproject.toml file and when usingpoetry run pytest
it runs the tests in tests/ directory and when usingpoetry run pytest tests_integration/
it runs the tests in the tests_integration directory.Let's start with a concrete example of what we want and what currently works.
pyproject.toml
tests/tests_env.py:
tests_integration/test_env.py:
tests_integration/pytest.ini:
Running it:
The above is working how we want it to work.
Moving to the native toml syntax for pytest-env:
pyproject.toml changed to:
rest of the files kept as-is
Running again:
What we're looking for is to be able to:
(An accepted/expected limitation in the above is that
pytest
will never run tests/ and tests_integration/ at the same time/in the same process)The text was updated successfully, but these errors were encountered: