ahupp / python-magic

A python wrapper for libmagic
Other
2.59k stars 280 forks source link

Fix two failing tests on Linux #321

Open cclauss opened 3 months ago

cclauss commented 3 months ago

In #318, I had to add @pytest.mark.skipif(sys.platform == "linux", reason="'JSON data' not found") to two tests.

It would be great if someone could modify test/python_magic_test.py to fix these tests and remove the TODO and the skipif lines.

    # TODO: Fix this failing test on Ubuntu
    @pytest.mark.skipif(sys.platform == "linux", reason="'JSON data' not found")
    def test_descriptions(self):
        ...

    # TODO: Fix this failing test on Ubuntu
    @pytest.mark.skipif(sys.platform == "linux", reason="'JSON data' not found")
    def test_descriptions_no_soft(self):
        ...

We will need libmagic1 >= v5.44 https://github.com/ahupp/python-magic/pull/327#issuecomment-2124402148

ddelange commented 3 months ago

My suspicion (https://github.com/ahupp/python-magic/pull/318#discussion_r1606797215) was confirmed. ci passes when installing latest libmagic from source on ubuntu-latest. See 8381a96 + 9c5f955 in https://github.com/ahupp/python-magic/pull/294. ci passing on my fork for the latter commit: https://github.com/ddelange/python-magic/actions/runs/9188880947