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
pytest-dotenv is very interesting for loading dotenv for integration tests (ie test that depends on the environment), for example to simulate the test environments in CI.
But this approach shall not be used for unit test that shall mock/stub/patch every dependency to outside, and typically the environment variable shall be simulated by something like monkeypatch.setenv. This is the I in FIRST principles (https://medium.com/@tasdikrahman/f-i-r-s-t-principles-of-testing-1a497acda8d6)
How we can restrict pytest-dotenv to only tests marked as "integration_tests"?
The text was updated successfully, but these errors were encountered:
Hello
pytest-dotenv is very interesting for loading dotenv for integration tests (ie test that depends on the environment), for example to simulate the test environments in CI.
But this approach shall not be used for unit test that shall mock/stub/patch every dependency to outside, and typically the environment variable shall be simulated by something like monkeypatch.setenv. This is the I in FIRST principles (https://medium.com/@tasdikrahman/f-i-r-s-t-principles-of-testing-1a497acda8d6)
How we can restrict pytest-dotenv to only tests marked as "integration_tests"?
The text was updated successfully, but these errors were encountered: