Skip to content

Commit f38073c

Browse files
fix tests for libarchive 3.8.10 (#145)
Two entry tests broke with libarchive 3.8.10: - testtar.tar is now rejected with "Unsupported pax global extended header attribute 'gname'" rather than "Damaged tar archive" [1], so accept either message. - The ZIP reader now honours the NTFS (0x000A) extra field [2], reporting unicode2.zip's mtime in UTC with sub-second precision instead of the local-time MS-DOS field stored in the fixture, so ignore mtime in that comparison. [1] libarchive/libarchive@1769a39 [2] libarchive/libarchive@4f16dbc
1 parent 7e8cb85 commit f38073c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/test_entry.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def test_check_archiveentry_using_python_testtar():
6565
try:
6666
check_entries(join(data_dir, 'testtar.tar'))
6767
except ArchiveError as e:
68-
assert e.msg == "Damaged tar archive"
68+
assert e.msg in ("Damaged tar archive",
69+
"Unsupported pax global extended header attribute 'gname'")
6970

7071

7172
def test_check_archiveentry_with_unicode_and_binary_entries_tar():
@@ -77,7 +78,7 @@ def test_check_archiveentry_with_unicode_and_binary_entries_zip():
7778

7879

7980
def test_check_archiveentry_with_unicode_and_binary_entries_zip2():
80-
check_entries(join(data_dir, 'unicode2.zip'), ignore='mode')
81+
check_entries(join(data_dir, 'unicode2.zip'), ignore='mode mtime')
8182

8283

8384
def test_check_archiveentry_with_unicode_entries_and_name_zip():

0 commit comments

Comments
 (0)