python-hyper / python-hyper/brotlicffi

test_brotli_version test broken when using pypi sdist

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
154
Forks
34
Avg merge
1d 1h
Merged PRs (30d)
3

Description

Hi,

Running the test suite of 1.1.0.0 with pytest from its sdist (pypi hosted) source, I see:

_____________________________ test_brotli_version ______________________________

    def test_brotli_version():
        """
        Test that the __version__ starts with the
        Brotli version that's compiled with.
        """
        version_h = join(
            dirname(dirname(abspath(__file__))), "libbrotli/c/common/version.h"
        )
>       with open(version_h) as f:
E       FileNotFoundError: [Errno 2] No such file or directory: '/tmp/guix-build-python-brotlicffi-1.1.0.0.drv-0/brotlicffi-1.1.0.0/libbrotli/c/common/version.h'

test/test_compatibility.py:31: FileNotFoundError

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/test_compatibility.py and inspect the PyPI sdist contents around libbrotli/c/common/version.h. Reproduce test_brotli_version against the sdist, then make the test behave correctly when that source path is absent and confirm the test suite passes from the packaged source.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.