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

place tests outside the package #3

Open
johnyf opened this issue Jun 4, 2017 · 2 comments
Open

place tests outside the package #3

johnyf opened this issue Jun 4, 2017 · 2 comments

Comments

@johnyf
Copy link

johnyf commented Jun 4, 2017

The tests are located within the module ballpark.tests. It is a common convention to place tests outside the package, usually in a directory tests. They can still be distributed with the package, by adding a file MANIFEST.in.

@asfaltboy
Copy link

We can also leave them where they are, but exclude them from the setup.py, e.g:

setup(
    ...
    packages=find_packages(exclude=['tests*', 'tests.*', '*.tests']),
)

Either way, we should avoid importing them:

from . import notation, shortcuts, statistics, tests

@johnyf
Copy link
Author

johnyf commented Mar 9, 2021

It seems to me that tests would better be included in the file MANIFEST.in, so that they be included in the source distribution , and thus be available on PyPI. I agree to not import tests within the package itself.

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