Skip to content

pytest plugin used to set environment variables

License

Notifications You must be signed in to change notification settings

jayvdb/pytest-env

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytest-env

This is a py.test plugin that enables you to set environment variables in the pytest.ini file.

Installation

Install with pip::

pip install pytest-env

Uninstall with pip::

pip uninstall pytest-env

Usage

In your pytest.ini file add a key value pair with env as the key and the environment variables as a line separated list of KEY=VALUE entries. The defined variables will be added to the environment before any tests are run:

[pytest]
env = 
    HOME=~/tmp
    RUN_ENV=test

You can use D: (default) as prefix if you don't want to override existing environment variables:

[pytest]
env = 
    D:HOME=~/tmp
    D:RUN_ENV=test

About

pytest plugin used to set environment variables

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%