Fix bad test code

This commit is contained in:
Danny Lin 2025-05-27 07:48:07 +08:00
parent e76f9a1bc1
commit 93f4c25d39

View file

@ -2158,9 +2158,9 @@ def test_repack_removed_partial(self):
def test_repack_removed_bytes_between_files(self):
"""Should not remove bytes between local file entries."""
# calculate the expected results
for ii in ([0], [1], [2]):
with self.subTest(removed=ii):
# calculate the expected results
expected_zinfos = []
with open(TESTFN, 'wb') as fh:
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):
"""Should raise when providing non-removed zinfos."""
# calculate the expected results
for ii in ([0], [1], [2]):
with self.subTest(removed=ii):
self._prepare_zip_from_test_files(TESTFN, self.test_files)