-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: consolidate default environment variables
Use pytest to provide default environment variables for testing instead of defining them in multiple places. This would enable users to run pytest outisde tox without having to define extra variables. Signed-off-by: Sorin Sbarnea <[email protected]>
- Loading branch information
Showing
3 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
import os | ||
import pytest | ||
|
||
pytest_plugins = ['helpers_namespace'] | ||
|
||
|
||
@pytest.fixture | ||
def environ(): | ||
# adds extra environment variables that may be needed during testing | ||
if not os.environ.get('TEST_BASE_IMAGE', ""): | ||
os.environ['TEST_BASE_IMAGE'] = 'pycontribs/centos:7' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters