summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-01 10:16:39 -0400
committerNed Batchelder <ned@nedbatchelder.com>2016-11-01 10:16:39 -0400
commitf1bdb959342772937b2d4de139b929bb0f5855a0 (patch)
tree09f3166248575f92db6ed48c6b123594584497af /igor.py
parent30d25d0dafc5acbd6cb5175899bf3615a48780f9 (diff)
downloadpython-coveragepy-git-f1bdb959342772937b2d4de139b929bb0f5855a0.tar.gz
Optionally use pytest as the test runner
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/igor.py b/igor.py
index 54b8da16..77c97d3c 100644
--- a/igor.py
+++ b/igor.py
@@ -102,8 +102,13 @@ def run_tests(tracer, *nose_args):
if 'COVERAGE_TESTING' not in os.environ:
os.environ['COVERAGE_TESTING'] = "True"
print_banner(label_for_tracer(tracer))
- nose_args = ["nosetests"] + list(nose_args)
- nose.core.main(argv=nose_args)
+ if 'COVERAGE_PYTEST' in os.environ:
+ import pytest
+ runner_args = list(nose_args)
+ pytest.main(runner_args)
+ else:
+ nose_args = ["nosetests"] + list(nose_args)
+ nose.core.main(argv=nose_args)
def run_tests_with_coverage(tracer, *nose_args):