pyuca
pyuca copied to clipboard
Tests missing from PyPI
I am trying to package pyuca for NixOS but cannot run tests because the PyPI package lacks them.
See also the Debian thread about the issue: https://lists.debian.org/debian-python/2016/04/msg00074.html
I don't think the tests should ship with the package normally. Is there a workaround I can help with?
I think you are supposed to include the unit test into the tarball but not into the wheel.
Looking through the packaging docs, I could not find anything mentioning whether to include tests into the tarball. The following StackOverflow answers suggest they are supposed to be included:
https://stackoverflow.com/a/16444257/160386 https://stackoverflow.com/a/32391295/160386 https://stackoverflow.com/a/14437754/160386
Out of top 15 packages on PyPI, only three (pip, awscli and colorama) do not include tests in the tarballs so it seems to be common practice.
yep, makes sense to include them in a source distribution. I just need to work out how to now :-)
Requests seem to add it through MANIFEST.in: https://github.com/requests/requests/blob/master/MANIFEST.in
I can second that. Unit tests can be used by packagers to test the distro package.