cpython: ca5431a434d6 (original) (raw)

--- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -456,8 +456,7 @@ class ZipFileModifiedAfterImportTestCase # Now that the zipfile has been replaced, import something else from it # which should fail as the file contents are now garbage. with self.assertRaises(ImportError):

@@ -486,9 +485,9 @@ class ZipFileModifiedAfterImportTestCase exec("from {} import {}".format(TESTPACK, TESTMOD), test_ns) self.assertEqual(test_ns[TESTMOD].test_value, 38)

def testZipFileSubpackageImport(self): @@ -497,7 +496,7 @@ class ZipFileModifiedAfterImportTestCase # Put a subdirectory within the zip file into the import path. sys.path.insert(0, self.zipfile_path + os.sep + TESTPACK)

@@ -507,7 +506,7 @@ class ZipFileModifiedAfterImportTestCase # Confirm that imports from the top level of the zip file # (already in sys.path from the setup call above) still work.

@@ -517,7 +516,7 @@ class ZipFileModifiedAfterImportTestCase self.truncateAndFillZipWithNonZipGarbage() # Imports should now fail. with self.assertRaises(ImportError):

@@ -525,14 +524,14 @@ class ZipFileModifiedAfterImportTestCase self.restoreZipFileWithDifferentHeaderOffsets() # Imports should work again, the central directory TOC will be re-read.