quiqua / pytest-dotenv

A py.test plugin that parses environment files before running tests
MIT License
189 stars 18 forks source link

Allow to specify the path to a file via the command line #15

Closed quiqua closed 4 years ago

quiqua commented 4 years ago

This PR will add the option to specify a .env file (or similar) via the newly introduced command line option --envfile.

When this option is present, it will load the file and set all declared environment variables and ignores the setting env_override_existing_values specified in the pytest.ini file.

Futhermore the hook has been moved to sessionstart and tests have been added.

quiqua commented 4 years ago

This PR will fix #15