Kaydet (Commit) 94554921 authored tarafından Nick Coghlan's avatar Nick Coghlan

Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly

üst b48ff7fd
...@@ -285,8 +285,9 @@ class ImportlibMigrationTests(unittest.TestCase): ...@@ -285,8 +285,9 @@ class ImportlibMigrationTests(unittest.TestCase):
self.assertEqual(len(w.warnings), 0) self.assertEqual(len(w.warnings), 0)
def test_get_importer_avoids_emulation(self): 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: with check_warnings() as w:
self.assertIsNotNone(pkgutil.get_importer(sys.path[0])) self.assertIsNone(pkgutil.get_importer("*??"))
self.assertEqual(len(w.warnings), 0) self.assertEqual(len(w.warnings), 0)
def test_iter_importers_avoids_emulation(self): def test_iter_importers_avoids_emulation(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment