Exclude the tests directory from the list of packages in the call of find_packages.
This commit is contained in:
parent
8c06f1e534
commit
c06ee74072
2 changed files with 5 additions and 1 deletions
|
|
@ -43,3 +43,7 @@ The decisions `cookiecutter-pypackage-minimal` makes should all be explained her
|
|||
This can be changed easily, though pytest is a easier, more powerful test library and runner than the standard library's unittest.
|
||||
* **Define testing dependencies in `tox.ini`**
|
||||
Avoid duplicating dependency definitions, and use `tox.ini` as the canonical description of how the unittests should be run.
|
||||
* **`tests` directory should not be a package**
|
||||
The `tests` directory should not be a Python package unless you want to define some fixtures.
|
||||
But the best practices are to use [PyTest fixtures](https://docs.pytest.org/en/latest/fixture.html) which provides a better solution.
|
||||
Therefore, the `tests` directory has no `__init__.py` file.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ setuptools.setup(
|
|||
description="{{ cookiecutter.package_description }}",
|
||||
long_description=open('README.rst').read(),
|
||||
|
||||
packages=setuptools.find_packages(),
|
||||
packages=setuptools.find_packages(exclude=('tests',)),
|
||||
|
||||
install_requires=[],
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue