Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9455492

Browse files
committed
Issue #15314: Tweak a pkgutil test to hopefully be more Windows friendly
1 parent b48ff7f commit 9455492

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_pkgutil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ def test_get_loader_avoids_emulation(self):
285285
self.assertEqual(len(w.warnings), 0)
286286

287287
def test_get_importer_avoids_emulation(self):
288+
# We use an illegal path so *none* of the path hooks should fire
288289
with check_warnings() as w:
289-
self.assertIsNotNone(pkgutil.get_importer(sys.path[0]))
290+
self.assertIsNone(pkgutil.get_importer("*??"))
290291
self.assertEqual(len(w.warnings), 0)
291292

292293
def test_iter_importers_avoids_emulation(self):

0 commit comments

Comments
 (0)