-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I'm not sure why it's so hard to get system environmental variables into TOX. I mean, how else do you use secret API keys in a shared environment (ie, not cloning them to github).
So I came across pytest-env because it looked exactly like I want, but it doesn't seem to be as easy as your readme would have me believe.
This is my pytest.ini
[pytest]
env =
API_KEY={API_KEY}
In my conftest.ini I use it like this.
key = os.environ['API_KEY']
running tox gives me this error
File "/mnt/e/Lamden/clove/.tox/python/lib/python3.6/site-packages/pytest_env/plugin.py", line 32, in pytest_load_initial_conftests
value = value.format(**os.environ)
KeyError: 'API_KEY'
What do you think I'm doing wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels