sciunto-org / python-bibtexparser

Bibtex parser for Python 3
https://bibtexparser.readthedocs.io
MIT License
474 stars 132 forks source link

Packaging: Include all files necessary for testing #486

Open hseg opened 5 months ago

hseg commented 5 months ago

Describe the bug Attempting to package 2.0.0b7, I run into the problem that tests/test_entrypoint.py::test_gbk needs tests/resources/gbk_test.bib, which is not included in the tarball. I'm working around it by skipping that particular test, but the policy seems inconsistent -- either releases aren't meant to include tests (in which case the presence of the tests directory is weird) or they should include the resources necessary to run them (in which case gbk_test.bib's absence is weird)

Reproducing

Version: 2.0.0.b7

Code:

wget https://files.pythonhosted.org/packages/source/b/bibtexparser/bibtexparser-2.0.0b7.tar.gz
tar xvf bibtexparser-2.0.0b7.tar.gz
cd bibtexparser-2.0.0b7/
python -m pytest
....
======================================== short test summary info =========================================
FAILED tests/test_entrypoint.py::test_gbk - FileNotFoundError: [Errno 2] No such file or directory: 'tests/resources/gbk_test.bib'
====================================== 1 failed, 47 passed in 0.79s ======================================

Workaround Invoking pytest instead as

python -m pytest -k 'not (test_entrypoint.py and test_gbk)'

which skips the broken test.

Remaining Questions (Optional) Please tick all that apply:

hseg commented 5 months ago

... I just found out the package has been adopted into the official repos, and so will not be packaging it. I hope the issue is still valuable to you, but won't be able to offer much help checking solutions. Sorry for the noise.

MiWeiss commented 5 months ago

thanks a lot. i'll have a look at this