diff --git a/.gitignore b/.gitignore index 835497e..6ba6df2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ junit.xml dist/ build/ htmlcov/ +.cache # Vi *.sw* diff --git a/tests/test_config.py b/tests/test_config.py index 9411872..e9be608 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,4 @@ +import os import stups_cli.config @@ -11,3 +12,10 @@ def test_store_load_config(): stups_cli.config.store_config(cfg, 'foobar') new_cfg = stups_cli.config.load_config('foobar') assert cfg == new_cfg + + +def test_load_config_with_environment(): + os.environ['EXAMPLE_PROJ_MY_KEY'] = 'some value' + cfg = stups_cli.config.load_config('example-proj') + assert cfg == {'my_key': 'some value'} +