pyjade icon indicating copy to clipboard operation
pyjade copied to clipboard

Include tests in release on PyPI

Open FRidh opened this issue 9 years ago • 3 comments

Please include the tests when distributing released via PyPI. Packagers like to have those tests to test whether their package works correctly. Thanks!

FRidh avatar Sep 01 '16 07:09 FRidh

Why do you want to include tests into PyPI package? PyPI packages intends to exclude tests, examples and documentation from they content. It must contains package source code only.

If you want to test this package on your machine clone this repository directly.

proofit404 avatar Sep 06 '16 13:09 proofit404

PyPI packages intends to exclude tests, examples and documentation from they content. It must contains package source code only.

Why is that the case? There is nothing written that PyPI packages should exclude such data. Furthermore, including tests in a release doesn't necessarily mean that the tests are installed - that you control with your setup.py.

As I wrote, maintainers prefer to test whether their build of the package works. Sure, we could checkout the repo instead of downloading an archive from PyPI, but that means collecting sources from different places. And this is I think exactly what PyPi is for, to provide a single place to find all Python packages.

I won't tell you that you should do this or that, but I'm just asking and mentioning that downstream typically prefers this, and in fact, the majority of the Python packages we distribute (Nix/NixOS) run the test suite because the test suite is included in the PyPi release.

FRidh avatar Sep 06 '16 14:09 FRidh

I'm not familiar with Nix package manager, so I can't tell anything.

If tests present in the package and not installed or runs, its a dead code which cause nothing except bigger distribution and abuse my internet channel.

tox provides perfect testing scenario. It build a package for you, install it into prepared environment and then runs tests collected with another tool agains installed package. This separates tests and code which is a good thing.

proofit404 avatar Sep 06 '16 14:09 proofit404