mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Fix bad test code
This commit is contained in:
parent
e76f9a1bc1
commit
93f4c25d39
1 changed files with 7 additions and 8 deletions
|
|
@ -2158,9 +2158,9 @@ def test_repack_removed_partial(self):
|
||||||
|
|
||||||
def test_repack_removed_bytes_between_files(self):
|
def test_repack_removed_bytes_between_files(self):
|
||||||
"""Should not remove bytes between local file entries."""
|
"""Should not remove bytes between local file entries."""
|
||||||
# calculate the expected results
|
|
||||||
for ii in ([0], [1], [2]):
|
for ii in ([0], [1], [2]):
|
||||||
with self.subTest(removed=ii):
|
with self.subTest(removed=ii):
|
||||||
|
# calculate the expected results
|
||||||
expected_zinfos = []
|
expected_zinfos = []
|
||||||
with open(TESTFN, 'wb') as fh:
|
with open(TESTFN, 'wb') as fh:
|
||||||
with zipfile.ZipFile(fh, 'w', self.compression) as zh:
|
with zipfile.ZipFile(fh, 'w', self.compression) as zh:
|
||||||
|
|
@ -2198,7 +2198,6 @@ def test_repack_removed_bytes_between_files(self):
|
||||||
|
|
||||||
def test_repack_removed_bad_removed_zinfos(self):
|
def test_repack_removed_bad_removed_zinfos(self):
|
||||||
"""Should raise when providing non-removed zinfos."""
|
"""Should raise when providing non-removed zinfos."""
|
||||||
# calculate the expected results
|
|
||||||
for ii in ([0], [1], [2]):
|
for ii in ([0], [1], [2]):
|
||||||
with self.subTest(removed=ii):
|
with self.subTest(removed=ii):
|
||||||
self._prepare_zip_from_test_files(TESTFN, self.test_files)
|
self._prepare_zip_from_test_files(TESTFN, self.test_files)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue