summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/coveragetest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 15109134..dcb984b3 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -81,7 +81,9 @@ class CoverageTest(
show_stderr = True
# Temp dirs go to $TMPDIR/coverage_test/*
- temp_dir_prefix = "coverage_test/{}/".format(os.getenv('COVERAGE_ENV_ID', 'x'))
+ temp_dir_prefix = "coverage_test/"
+ if os.getenv('COVERAGE_ENV_ID'):
+ temp_dir_prefix += "{}/".format(os.getenv('COVERAGE_ENV_ID'))
# Keep the temp directories if the env says to.
# $set_env.py: COVERAGE_KEEP_TMP - Keep the temp directories made by tests.