diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-07-17 21:37:58 +1000 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-07-17 21:37:58 +1000 |
commit | bf2243f0926ec8aadf3c0c53a0567c25c1ee59fe (patch) | |
tree | f66ad366fd0920d61596af979e570ab853b7f9b8 /Lib/test/test_pkgutil.py | |
parent | 71902d6d50d0ec313c445d6ba2917e63f2972827 (diff) | |
download | cpython-bf2243f0926ec8aadf3c0c53a0567c25c1ee59fe.tar.gz |
Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r-- | Lib/test/test_pkgutil.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py index 73c6869b7f..88e2d338dc 100644 --- a/Lib/test/test_pkgutil.py +++ b/Lib/test/test_pkgutil.py @@ -285,8 +285,9 @@ class ImportlibMigrationTests(unittest.TestCase): self.assertEqual(len(w.warnings), 0) def test_get_importer_avoids_emulation(self): + # We use an illegal path so *none* of the path hooks should fire with check_warnings() as w: - self.assertIsNotNone(pkgutil.get_importer(sys.path[0])) + self.assertIsNone(pkgutil.get_importer("*??")) self.assertEqual(len(w.warnings), 0) def test_iter_importers_avoids_emulation(self): |