Skip to content

Switch to pytest as a test runner #393

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

Merged
merged 2 commits into from
Oct 19, 2018
Merged

Switch to pytest as a test runner #393

merged 2 commits into from
Oct 19, 2018

Conversation

jmadler
Copy link
Contributor

@jmadler jmadler commented Oct 19, 2018

This change switches from 'python setup.py test' to 'pytest' as a test runner under the tox environment, and encourages use of tox.

This eliminates a class of test failures under Python 3 caused by usage of the unsupported path of combining tox and 'python setup.py tests':

https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Specifically in our case, the PYTHONPATH included . and src/, which resulted in e.g. reprlib being discovered under src/ instead of in the core stdlib.

@jmadler
Copy link
Contributor Author

jmadler commented Oct 19, 2018

From Travis CI for py27:

python setup.py test:

Ran 1086 tests in 43.175s
OK (skipped=26, expected failures=62)

pytest:

======= 1002 passed, 26 skipped, 62 xfailed, 1 warnings in 44.67 seconds =======

The additional 4 tests are likely from the set skipped on travis previously by discover_tests.sh.

This doesn't fix all of the Python3 test failures, but does bring Py34 green.

@jmadler jmadler merged commit e979fa3 into PythonCharmers:master Oct 19, 2018
@jmadler jmadler deleted the testrevamp branch October 19, 2018 21:21
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

Successfully merging this pull request may close these issues.

1 participant