Pytest plugin to validate use of envvars on your tests
Project description
Pytest plugin to validate use of envvars on your tests
What is pytest-envvars?
pytest-envvars randomize values of environment variables on your unit tests to check consistency of mocks about configuration. If the test has a wrong mock, this test will be broken.
Install
$ pip install pytest-envvars
Use
You need write some changes on pytest.ini file, like that…
[pytest]
pytestenvvars__env_files =
.env
pytestenvvars__dont_randomize_envvars =
CACHE_URL
On this example above the plugin read .env file (from pytestenvvars__env_files section) of your project and randomize ALL envvar configuration on that file, if you dont need randomize some envvar configuration you need add this envvar to pytestenvvars__dont_randomize_envvars section like shown above.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_envvars-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bc36d034b8a334c3c70dc7e80d16f379a3b740a49810d8ca6433cafc4761f66 |
|
MD5 | 2e1d663c116167dd3a60dc7392e08c7b |
|
BLAKE2b-256 | 3bff2341696abc5157b48c9e80fae46cbec972a4fb49f167d74929d33acb1741 |