Skip to content

How to specify in pytest.ini that a .env file should be respected? #9261

Discussion options

You must be logged in to vote

pytest core doesn't come with any support for .env files - but there are plugins which add that functionality, such as pytest-dotenv or pytest-env.

If this is just about PYTHONPATH, there's also pytest-pythonpath and pytest-srcpaths, with native support of a pythonpath setting being added to pytest 7.0.0 soon (see #9134).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mithrandir2k18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants