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 /tests/test_oddball.py | |
parent | b1bfcd4c3a1486996dcfc79c40dfa661ee15cebb (diff) | |
download | python-coveragepy-effc2b282377d077a3c68e8bc0e97630c82fe4fb.tar.gz |
Optionally use pytest as the test runner
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r-- | tests/test_oddball.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py index 87c65b0..7fc122a 100644 --- a/tests/test_oddball.py +++ b/tests/test_oddball.py @@ -353,7 +353,8 @@ class DoctestTest(CoverageTest): # of coverage will get. Deleting the imported module here is # enough: when the test imports doctest again, it will get a fresh # copy without the monkeypatch. - del sys.modules['doctest'] + if 'doctest' in sys.modules: + del sys.modules['doctest'] def test_doctest(self): self.check_coverage('''\ |