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

Remove tests from production code #124

Merged
merged 1 commit into from
Jul 3, 2019
Merged

Remove tests from production code #124

merged 1 commit into from
Jul 3, 2019

Conversation

escodebar
Copy link
Contributor

@escodebar escodebar commented Jun 29, 2019

Remove find_packages and add engineio packages

...to prevent the tests to be included in production code.

From "Using find_packages()":

For simple projects, it’s usually easy enough to manually add
packages to the packages argument of setup(). However, for very
large projects (Twisted, PEAK, Zope, Chandler, etc.), it can be a
big burden to keep the package list updated. That’s what
setuptools.find_packages() is for.

Read:
https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages

Resolves #123

@escodebar escodebar changed the title Remove __init__.py from tests Remove tests from production code Jun 29, 2019
...to prevent the tests to be included in production code.

From "Using find_packages()":
    For simple projects, it’s usually easy enough to manually add
    packages to the packages argument of setup(). However, for very
    large projects (Twisted, PEAK, Zope, Chandler, etc.), it can be a
    big burden to keep the package list updated. That’s what
    setuptools.find_packages() is for.

Read:
https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages

Resolves #123
@escodebar
Copy link
Contributor Author

I changed the previous commit, because removing the __init__.py lead to tests not being found by python setup.py test. This new implementation prevents the tests from appearing in the production (installed) code and allows python setup.py test to find the test files (and therefore collect the tests).

@miguelgrinberg miguelgrinberg merged commit 399dc8a into miguelgrinberg:master Jul 3, 2019
@miguelgrinberg
Copy link
Owner

Thanks!

@miguelgrinberg miguelgrinberg self-assigned this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are part of the production code
2 participants