summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-21 06:30:26 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-21 06:30:26 -0500
commit100178efcea0ed6ed51ab718f6d7b28d0e6f3206 (patch)
tree6b13b2cdd49fb19e3a98cacbb3bed23e8a652159
parent7fd16a309ec396dd02e0a2c6bb7b9da103943c51 (diff)
downloadpython-coveragepy-100178efcea0ed6ed51ab718f6d7b28d0e6f3206.tar.gz
Make igor usable without pytest
-rw-r--r--igor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/igor.py b/igor.py
index 2754b06..07641f9 100644
--- a/igor.py
+++ b/igor.py
@@ -20,8 +20,6 @@ import textwrap
import warnings
import zipfile
-import pytest
-
# We want to see all warnings while we are running tests. But we also need to
# disable warnings for some of the more complex setting up of tests.
warnings.simplefilter("default")
@@ -97,6 +95,8 @@ def should_skip(tracer):
def run_tests(tracer, *runner_args):
"""The actual running of tests."""
+ import pytest
+
if 'COVERAGE_TESTING' not in os.environ:
os.environ['COVERAGE_TESTING'] = "True"
print_banner(label_for_tracer(tracer))
@@ -105,6 +105,7 @@ def run_tests(tracer, *runner_args):
def run_tests_with_coverage(tracer, *runner_args):
"""Run tests, but with coverage."""
+ import pytest
# Need to define this early enough that the first import of env.py sees it.
os.environ['COVERAGE_TESTING'] = "True"