Skip to content

Packaging: Include all files necessary for testing #486

@hseg

Description

@hseg

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:

  • I would be willing to contribute a PR to fix this issue.
  • This issue is a blocker, I'd be grateful for an early fix.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions