Merge pull request #12 from laurent-laporte-pro/fix/issue_11

`tests` directory should not be a package: remove `tests/__init__.py` and exclude it from `find_resources`.
This commit is contained in:
Louis Taylor 2018-10-06 13:54:07 +01:00 committed by GitHub
commit c1a6513314
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -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.

View 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=[],