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 | f1bdb959342772937b2d4de139b929bb0f5855a0 (patch) | |
| tree | 09f3166248575f92db6ed48c6b123594584497af /tests | |
| parent | 30d25d0dafc5acbd6cb5175899bf3615a48780f9 (diff) | |
| download | python-coveragepy-git-f1bdb959342772937b2d4de139b929bb0f5855a0.tar.gz | |
Optionally use pytest as the test runner
Diffstat (limited to 'tests')
| -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 87c65b0e..7fc122af 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('''\ |
