debrouwere / python-ballpark

Better human-readable numbers
ISC License
40 stars 14 forks source link

place tests outside the package #3

Open johnyf opened 7 years ago

johnyf commented 7 years ago

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 commented 4 years ago

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: https://github.com/debrouwere/python-ballpark/blob/0b871cdf5b4b5f50e5f3f3d044558801783381c4/ballpark/__init__.py#L1

johnyf commented 3 years ago

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.