diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-01 10:16:39 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-01 10:16:39 -0400 |
commit | effc2b282377d077a3c68e8bc0e97630c82fe4fb (patch) | |
tree | 611be5ed68e4155a54ac5ec68500918f4b2e491c /igor.py | |
parent | b1bfcd4c3a1486996dcfc79c40dfa661ee15cebb (diff) | |
download | python-coveragepy-effc2b282377d077a3c68e8bc0e97630c82fe4fb.tar.gz |
Optionally use pytest as the test runner
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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): |