Hi,
while packaging griffe 2.0.2 for openSUSE, the test suite fails when run from the PyPI source tarball (sdist), even though most of the suite passes.
The failing test is:
tests/test_finder.py::test_meson_python_file_handling
Failure:
FileNotFoundError: [Errno 2] No such file or directory: 'packages/griffelib/src'
From the test:
pth_file.write_text(
"hello=1\ninstall({'griffe', 'hello'}, 'packages/griffelib', ['/tmp/ninja'], False)",
encoding="utf8",
)
...
assert paths == [Path("packages/griffelib/src")]
The problem seems to be that the test assumes a repository/workspace checkout layout where packages/griffelib/src exists. However, in the published sdist, the packages/ directory is not included.
Relevant pyproject.toml bits:
- the sdist include list does not include /packages
- but the project still defines a workspace with members = ["packages/*"]
So either:
- the sdist should include the packages/ tree needed by the tests, or
- this test should not assume checkout-only paths when run from an sdist
In downstream packaging, we currently have to skip this single test when testing from the released tarball.
Would you prefer a patch to the test, or should the sdist contents be adjusted?
Hi,
while packaging
griffe 2.0.2for openSUSE, the test suite fails when run from the PyPI source tarball (sdist), even though most of the suite passes.The failing test is:
tests/test_finder.py::test_meson_python_file_handlingFailure:
The problem seems to be that the test assumes a repository/workspace checkout layout where
packages/griffelib/srcexists. However, in the published sdist, the packages/ directory is not included.Relevant pyproject.toml bits:
So either:
In downstream packaging, we currently have to skip this single test when testing from the released tarball.
Would you prefer a patch to the test, or should the sdist contents be adjusted?