mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Restored test_interleaved. After issue #8886 it was a duplicate of
test_different_file.
This commit is contained in:
commit
91762da45b
1 changed files with 5 additions and 4 deletions
|
|
@ -1867,11 +1867,12 @@ class TestsWithMultipleOpens(unittest.TestCase):
|
||||||
for f in get_files(self):
|
for f in get_files(self):
|
||||||
self.make_test_archive(f)
|
self.make_test_archive(f)
|
||||||
with zipfile.ZipFile(f, mode="r") as zipf:
|
with zipfile.ZipFile(f, 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)
|
data1 = zopen1.read(500)
|
||||||
data2 = zopen2.read(500)
|
with zipf.open('twos') as zopen2:
|
||||||
data1 += zopen1.read()
|
data2 = zopen2.read(500)
|
||||||
data2 += zopen2.read()
|
data1 += zopen1.read()
|
||||||
|
data2 += zopen2.read()
|
||||||
self.assertEqual(data1, self.data1)
|
self.assertEqual(data1, self.data1)
|
||||||
self.assertEqual(data2, self.data2)
|
self.assertEqual(data2, self.data2)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue