summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--igor.py2
-rw-r--r--metacov.ini2
2 files changed, 3 insertions, 1 deletions
diff --git a/igor.py b/igor.py
index c02e14bf..248b93f5 100644
--- a/igor.py
+++ b/igor.py
@@ -163,6 +163,8 @@ def run_tests_with_coverage(tracer, *runner_args):
os.environ['COVERAGE_HOME'] = os.getcwd()
context = os.environ.get('COVERAGE_CONTEXT')
if context:
+ if context[0] == "$":
+ context = os.environ[context[1:]]
os.environ['COVERAGE_CONTEXT'] = context + "." + tracer
# Create the .pth file that will let us measure coverage in sub-processes.
diff --git a/metacov.ini b/metacov.ini
index 787553f9..884babf7 100644
--- a/metacov.ini
+++ b/metacov.ini
@@ -16,7 +16,7 @@ source =
${COVERAGE_HOME-.}/tests
# $set_env.py: COVERAGE_DYNCTX - Set to 'test_function' for who-tests-what
dynamic_context = ${COVERAGE_DYNCTX-none}
-# $set_env.py: COVERAGE_CONTEXT - Set to a static context for this run
+# $set_env.py: COVERAGE_CONTEXT - Static context for this run (or $ENV_VAR like $TOX_ENV_NAME)
context = ${COVERAGE_CONTEXT-none}
[report]