Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle new libarchive versions #131

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tests/test_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import pytest

from libarchive import memory_reader, memory_writer
from libarchive import ArchiveError, memory_reader, memory_writer
from libarchive.entry import ArchiveEntry, ConsumedArchiveEntry, PassedArchiveEntry

from . import data_dir, get_entries, get_tarinfos
Expand Down Expand Up @@ -64,7 +64,13 @@ def test_check_ArchiveEntry_against_TarInfo():


def test_check_archiveentry_using_python_testtar():
check_entries(join(data_dir, 'testtar.tar'))
# This test behaves differently depending on the libarchive version:
# 3.5, 3.6 and presumably all future versions reject the archive as damaged,
# whereas older versions accepted it.
try:
check_entries(join(data_dir, 'testtar.tar'))
except ArchiveError as e:
assert e.msg == "Damaged tar archive"


def test_check_archiveentry_with_unicode_and_binary_entries_tar():
Expand Down
Loading