Skip to content

Commit 79d584e

Browse files
committed
Improve code comment and reduce magic number
1 parent f8adb0c commit 79d584e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_zipfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,10 +1655,10 @@ def _test_validate_local_file_entry(self, method):
16551655
m_sddnsbd.assert_not_called()
16561656
m_sddns.assert_not_called()
16571657

1658-
# return None if no sufficient header length
1658+
# return None if truncated local file header
16591659
bytes_ = self._generate_local_file_entry(
16601660
'file.txt', b'dummy', compression=method)
1661-
bytes_ = bytes_[:29]
1661+
bytes_ = bytes_[:zipfile.sizeFileHeader - 1]
16621662
fz = io.BytesIO(bytes_)
16631663
with mock.patch.object(repacker, '_scan_data_descriptor',
16641664
wraps=repacker._scan_data_descriptor) as m_sdd, \

0 commit comments

Comments
 (0)