]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Restored test_interleaved. After issue #8886 it was a duplicate of
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 May 2016 18:19:44 +0000 (21:19 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 May 2016 18:19:44 +0000 (21:19 +0300)
test_different_file.

Lib/test/test_zipfile.py

index 01750c1b125b0efc14b84cb83a4d84bf2fce796f..40033f22f4fc3307c6c7ab064aae657e6e574672 100644 (file)
@@ -1456,11 +1456,12 @@ class TestsWithMultipleOpens(unittest.TestCase):
         # multiple open() calls can be made without interfering with each other.
         self.make_test_archive(TESTFN2)
         with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
-            with zipf.open('ones') as zopen1, zipf.open('twos') as zopen2:
+            with zipf.open('ones') as zopen1:
                 data1 = zopen1.read(500)
-                data2 = zopen2.read(500)
-                data1 += zopen1.read()
-                data2 += zopen2.read()
+                with zipf.open('twos') as zopen2:
+                    data2 = zopen2.read(500)
+                    data1 += zopen1.read()
+                    data2 += zopen2.read()
             self.assertEqual(data1, self.data1)
             self.assertEqual(data2, self.data2)