-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Add a tox.ini that doesn't depend on setup.py test #368
Conversation
ea2b52d
to
a513684
Compare
I don't know why CPython 3.2 (with |
I guess the one question to ask is if we even want to bother testing for python 3.2 anymore, since it isn't well supported. Is it the default install for any setups? |
I don't know. Perhaps testing with CPython 3.2 without code coverage would make sense. Perhaps keeping only the last stable PyPy3 version (which is a Python 3.2) would be enough. Actually, it doesn't seem to be something about the watchdog code, only about its test suite. As of today, watchdog doesn't require any resource incompatible with Python 3.2. I think it would make more sense to remove compatibility when some used resource require other Python version, as happened with coverage.py when it required the |
The new py.test 3.0 dropped the Python 3.2 compatibility, as it's now using the u-prefixed unicode literals... I can rebase or make a new commit on this PR branch, updating the tox.ini to replace |
- Included more CPython versions: 3.2, 3.3, 3.5 and 3.6 - Included PyPy3 - Added {posargs} so one can test selected environments passing parameters to py.test (arguments after "--"), e.g. tox -e py35,py34 -- -k test_inotify - Coverage linked to the package, not to the directory
- Travis builds runs tox instead of "python setup.py test"; the latter was breaking on CPython 3.2 - Add jobs for the PyPy3, CPython 3.5 and CPython 3.6 (nightly) interpreters - Jobs running CPython 3.6 (nightly) are allowed to fail without failing the whole build
Rebased to use py.test < 3 on CPython 3.2. I can change it afterwards, if required. |
I can amend/rebase this to put CPython 3.2 as allowed to fail in Travis, if required/desired. |
Now the Travis nightly build is Python 3.7. Should I add a specific Python 3.6 Travis environment and explicitly include Python 3.7 on tox.ini? If this won't ever be merged, please tell me. Is this project dead? |
Project's not fully dead, I got contributor status by contacting the maintainer by email. Not sure if I should have received it, I had something I wanted to add and couldn't get anyone to pay attention to my PR. Unfortunately, I don't fully understand the whole project. However, this seems a good addition, so I'll merge it. |
Add a tox.ini that doesn't depend on setup.py test
Abstract
Update tox.ini to avoid the setup.py test command that installs pytest-timeout twice instead of pytest
Include more CPython versions: 3.2, 3.3, 3.5 and 3.6
Include PyPy3
Add
{posargs}
so one can test selected environments passing parameters to py.test (arguments after--
), e.g.Description
I wasn't able to run the watchdog test suite before due to the fact that pytest was installing pytest-timeout twice. This used to be the
tox -e py27
result:It installs pytest-timeout:
But when installing pytest, it installs pytest-timeout again:
Next, the tests doesn't run because pytest wasn't installed:
The same happened in a virtualenv with Python 3, that has nothing to do with tox:
And I don't see anything buggy in the setup.py either, it actually runs in my Python 3.2 environment:
I wanted to test on every environment without manually creating dozens of environments trying pip/setuptools versions (actually, that's why tox exist), and Python 3.2 is hard to test/use nowadays, since pip doesn't support it anymore.
I've changed the tox.ini to make it independent from the setup.py test command, and also to include Python 3.5, 3.6 and PyPy3. To test in Python 3.2, the environment that calls tox must have
virtualenv<14
(andpip<8
). For the remaining ones, that's not required.Tox caches downloads and virtualenvs. It allows passing parameters directly to py.test to call. For example,
Runs the tests on CPython 3.5, CPython 3.4 and PyPy3, always calling
py.test -k test_inotify
, i.e., only the 5 tests that matches with that name, deselecting the remaining ones.With this tox.ini I managed to run the entire test suite in every environment: