Skip to content

Commit 02919a6

Browse files
committed
Fix test failure
1 parent 7a33c7a commit 02919a6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ zipimport
119119
---------
120120

121121
* Remove deprecated :meth:`!zipimport.zipimporter.load_module`.
122-
They had previously raised a :exc:`DeprecationWarning` since Python 3.10.
123122
Use :meth:`zipimport.zipimporter.exec_module` instead.
124123
(Contributed by Jiahao Li in :gh:`133656`.)
125124

Lib/test/test_zipimport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ def testZipImporterMethods(self):
552552
"spam" + pyc_ext: test_pyc}
553553
self.makeZip(files, file_comment=b"spam")
554554

555+
sys.path.insert(0, TEMP_ZIP)
556+
555557
zi = zipimport.zipimporter(TEMP_ZIP)
556558
self.assertEqual(zi.archive, TEMP_ZIP)
557559
self.assertTrue(zi.is_package(TESTPACK))
@@ -664,6 +666,8 @@ def testZipImporterMethodsInSubDirectory(self):
664666
packdir2 + TESTMOD + pyc_ext: test_pyc}
665667
self.makeZip(files, file_comment=b"eggs")
666668

669+
sys.path.insert(0, TEMP_ZIP + os.sep + TESTPACK)
670+
667671
zi = zipimport.zipimporter(TEMP_ZIP + os.sep + packdir)
668672
self.assertEqual(zi.archive, TEMP_ZIP)
669673
self.assertEqual(zi.prefix, packdir)

0 commit comments

Comments
 (0)