mbarkhau / pylint-ignore

MIT License
14 stars 8 forks source link

Test fixtures not in published package #5

Closed agraul closed 3 years ago

agraul commented 3 years ago

I'm trying to build an RPM from the package at PyPI and part of the build process is to run a package's testsuite in the build environment. Tests that need the fixtures fail because the fixtures directory is not part of the source tarball (downloaded from PyPI). I can work around that by adding another source tarball that contains the fixtures, but it would be great if the fixtures were part of the released tarball.

Short test summary with list of failed tests:

[    4s] =========================== short test summary info ============================
[    4s] FAILED test/test_ignorefile.py::test_read_source_lines - FileNotFoundError: [...
[    4s] FAILED test/test_ignorefile.py::test_read_source_text - FileNotFoundError: [E...
[    4s] FAILED test/test_ignorefile.py::test_find_source_text_lineno - pylint_ignore....
[    4s] ERROR test/test_ignorefile.py::test_iter_entry_values - FileNotFoundError: [E...
[    4s] ERROR test/test_ignorefile.py::test_load - FileNotFoundError: [Errno 2] No su...
[    4s] ERROR test/test_ignorefile.py::test_dump - FileNotFoundError: [Errno 2] No su...
[    4s] ERROR test/test_ignorefile.py::test_find_entry - FileNotFoundError: [Errno 2]...
[    4s] ERROR test/test_main.py::test_selftest_no_ignore_update - FileNotFoundError: ...
[    4s] ERROR test/test_main.py::test_selftest_ignore_update_noop - FileNotFoundError...

This is the error that I see multiple times:

[    4s] E       FileNotFoundError: [Errno 2] No such file or directory: '/home/abuild/rpmbuild/BUILD/pylint-ignore-2021.1018/fixtures'
mbarkhau commented 3 years ago

Fair point.

mbarkhau commented 3 years ago

I hope this is fixed for you with pylint-ignore-2021.1019.tar.gz

agraul commented 3 years ago

Thank you very much, all tests are passing now! Thanks for the quick fixes!