summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-11-27 13:49:03 -0500
committerNed Batchelder <ned@nedbatchelder.com>2014-11-27 13:49:03 -0500
commit024c42c88ccbe5338fc308cf3e43c23092e295ba (patch)
treeb7a84654cadee48a2c712d76fc55fe4b0e62ecb4
parentcbfb93fb4a4b432d7a7a3648433412e614fc1d80 (diff)
downloadpython-coveragepy-git-024c42c88ccbe5338fc308cf3e43c23092e295ba.tar.gz
Nicer messages when skipping tracer types during testing.
-rw-r--r--igor.py16
-rw-r--r--tox.ini10
2 files changed, 15 insertions, 11 deletions
diff --git a/igor.py b/igor.py
index 3a1b6e23..6a42df59 100644
--- a/igor.py
+++ b/igor.py
@@ -45,14 +45,18 @@ def run_tests(tracer, *nose_args):
import nose.core
if tracer == "py":
label = "with Python tracer"
- if os.environ.get("COVERAGE_NO_PYTRACER"):
- print("Skipping tests, don't want PyTracer")
- return
+ skipper = os.environ.get("COVERAGE_NO_PYTRACER")
else:
label = "with C tracer"
- if os.environ.get("COVERAGE_NO_EXTENSION"):
- print("Skipping tests, no C extension in this environment")
- return
+ skipper = os.environ.get("COVERAGE_NO_EXTENSION")
+
+ if skipper:
+ msg = "Skipping tests " + label
+ if len(skipper) > 1:
+ msg += ": " + skipper
+ print(msg)
+ return
+
print_banner(label)
os.environ["COVERAGE_TEST_TRACER"] = tracer
nose_args = ["nosetests"] + list(nose_args)
diff --git a/tox.ini b/tox.ini
index 3b78ea52..c1dc50b0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -62,28 +62,28 @@ deps =
basepython = pypy2.2
# PyPy has no C extensions
setenv =
- COVERAGE_NO_EXTENSION=1
+ COVERAGE_NO_EXTENSION=no C extensions under PyPy
[testenv:pypy23]
basepython = pypy2.3
# PyPy has no C extensions
setenv =
- COVERAGE_NO_EXTENSION=1
+ COVERAGE_NO_EXTENSION=no C extensions under PyPy
[testenv:pypy24]
basepython = pypy2.4
# PyPy has no C extensions
setenv =
- COVERAGE_NO_EXTENSION=1
+ COVERAGE_NO_EXTENSION=no C extensions under PyPy
[testenv:pypy3_23]
basepython = pypy3-2.3
# PyPy has no C extensions
setenv =
- COVERAGE_NO_EXTENSION=1
+ COVERAGE_NO_EXTENSION=no C extensions under PyPy
[testenv:pypy3_24]
basepython = pypy3-2.4
# PyPy has no C extensions
setenv =
- COVERAGE_NO_EXTENSION=1
+ COVERAGE_NO_EXTENSION=no C extensions under PyPy