diff options
Diffstat (limited to 'tests/test_misc.py')
-rw-r--r-- | tests/test_misc.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py index 4fd3f7c7..745522b0 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -118,7 +118,8 @@ class ImportThirdPartyTest(CoverageTest): # Make sure we don't have pytest in sys.modules before we start. del sys.modules["pytest"] # Import pytest - mod = import_third_party("pytest") + mod, has = import_third_party("pytest") + assert has # Yes, it's really pytest: assert mod.__name__ == "pytest" print(dir(mod)) @@ -127,8 +128,8 @@ class ImportThirdPartyTest(CoverageTest): assert "pytest" not in sys.modules def test_failure(self): - mod = import_third_party("xyzzy") - assert mod is None + _, has = import_third_party("xyzzy") + assert not has assert "xyzzy" not in sys.modules |