ahupp / ahupp/python-magic

Fix two failing tests on Linux

Open
#321 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
304
PR merge metrics
No merged PRs in 30d

Description

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

  • #318

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/python_magic_test.py and run test_descriptions and test_descriptions_no_soft on Linux with libmagic1 >= v5.44. Compare the failures with the expected 'JSON data' behavior, then remove the TODO and skipif lines once both tests pass without platform-specific skipping.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.