]> granicus.if.org Git - python/commitdiff
Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly
authorNick Coghlan <ncoghlan@gmail.com>
Tue, 17 Jul 2012 11:37:58 +0000 (21:37 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Tue, 17 Jul 2012 11:37:58 +0000 (21:37 +1000)
Lib/test/test_pkgutil.py

index 73c6869b7f665292e6e9fcfb9d2b26886d68cd5a..88e2d338dcf284ebe7029dde181e802fb745875e 100644 (file)
@@ -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):