diff --git a/sflock/unpack/zip7.py b/sflock/unpack/zip7.py index 9f8a61cc..f1c73fd3 100644 --- a/sflock/unpack/zip7.py +++ b/sflock/unpack/zip7.py @@ -13,9 +13,9 @@ class Zip7File(Unpacker): name = "7zfile" exe = "/usr/bin/7z" - exts = b".7z", b".iso" + exts = b".7z", b".iso", b".xz" # TODO Should we use "isoparser" (check PyPI) instead of 7z? - magic = "7-zip archive", "ISO 9660" + magic = "7-zip archive", "ISO 9660", "UDF filesystem data", "XZ compressed data" def unpack(self, password=None, duplicates=None): dirpath = tempfile.mkdtemp() diff --git a/tests/test_magic.py b/tests/test_magic.py index 4a6965f9..b3b57acc 100644 --- a/tests/test_magic.py +++ b/tests/test_magic.py @@ -18,8 +18,8 @@ def test_magic(): def test_magic_exception(): assert magic.from_file( - "tests/files/invld.elf_" - ).startswith("ELF") + b"tests/files/invld.elf_" + ).startswith(b"ELF") assert magic.from_buffer( - open("tests/files/invld.elf_", "rb").read() + open(b"tests/files/invld.elf_", "rb").read() ).startswith("ELF") diff --git a/tests/test_main.py b/tests/test_main.py index 87135fd5..1e2a14cc 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -13,7 +13,7 @@ def test_supported(): assert supported() def test_count_supported(): - count = 9 + count = 10 if AceFile(None).supported(): count += 1