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

test_unar_tool test failure #104

Open
xiota opened this issue Apr 27, 2024 · 2 comments
Open

test_unar_tool test failure #104

xiota opened this issue Apr 27, 2024 · 2 comments

Comments

@xiota
Copy link

xiota commented Apr 27, 2024

Python 3.12

=================================== FAILURES ===================================
________________________________ test_unar_tool ________________________________

    @pytest.mark.skipif(sys.platform == "win32", reason="unar not available on Windows")
    @pytest.mark.skipif(not have_tool(rarfile.UNAR_TOOL), reason="unar not installed")
    def test_unar_tool():
        install_unar_tool()
        try:
>           test_read_rar3()

test/test_tool.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_tool.py:56: in test_read_rar3
    rf.read(fn)
rarfile.py:838: in read
    return f.read()
rarfile.py:2310: in read
    self._check()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <rarfile.PipeReader object at 0x7f5d0024f520>

    def _check(self):
        """Check final CRC."""
        final = self._md_context.digest()
        exp = self._inf._md_expect
        if exp is None:
            return
        if final is None:
            return
        if self._returncode:
            check_returncode(self._returncode, "", tool_setup().get_errmap())
        if self._remain != 0:
            raise BadRarFile("Failed the read enough data")
        if final != exp:
>           raise BadRarFile("Corrupt file - CRC check failed: %s - exp=%r got=%r" % (
                self._inf.filename, exp, final))
E           rarfile.BadRarFile: Corrupt file - CRC check failed: stest1.txt - exp=3317163682 got=3067759956

rarfile.py:2326: BadRarFile
=========================== short test summary info ============================
FAILED test/test_tool.py::test_unar_tool - rarfile.BadRarFile: Corrupt file -...
=================== 1 failed, 150 passed, 6 skipped in 9.35s ===================
@markokr
Copy link
Owner

markokr commented Apr 28, 2024

What is the version of unar you are running? And what OS are you on?

@xiota
Copy link
Author

xiota commented Apr 28, 2024

Arch Linux. unarchive 1.10.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants