Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include tests in release on PyPI #262

Open
FRidh opened this issue Sep 1, 2016 · 3 comments
Open

Include tests in release on PyPI #262

FRidh opened this issue Sep 1, 2016 · 3 comments

Comments

@FRidh
Copy link

FRidh commented Sep 1, 2016

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

@proofit404
Copy link

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.

@FRidh
Copy link
Author

FRidh commented Sep 6, 2016

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.

@proofit404
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants