The app needs a environment variable, e.g: APP_PLACE and it can have different values depending on the context it is running on.
link:app/main.py[role=include]
link:app/config.py[role=include]
What if the app needs the environment variable, e.g: APP_PLACE and its values could be EU
, AMERICAS
, AFRICA
, ASIA
, etc?
link:tests/Hello_test.py[role=include]
If one runs those test cases individually - it works well.
But it doesn’t work if one runs all tests because pytest or environ-config only loads APP_* variables once from the (O.S.)environment.