Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork940
Support for tox#179
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Support for tox#179
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
More and more packages are listing their dependencies inrequirements.txt which make it trivial to maintain and install them.
toxhttps://pypi.python.org/pypi/tox is a thin wrapper around virtualenvwhich let you craft a fresh python environement to execute command in.It creates the env with virtualenv, install dependencies, run pythonsetup.py install in it and then execute whatever command you want it todo and report status.To do so I simply:- listed tests dependencies in test-requirements.txt (which are just nose and mock)- provide a tox.ini file which describe how to install the dependencies and execute nosetests- added the module 'coverage' to the list of test dependenciesTo run tests simply: pip install tox && toxThat will execute the test command 'nosetests' using python2.6 and thenpython 2.7.The additional env 'cover' can be run using: tox -ecover.
Most people know about pep8 which enforce coding style. pyflakes goes astep beyond by analyzing the code.flake8 is basically a wrapper around both pep8 and pyflakes and comeswith some additional checks. I find it very useful since you only needto require one package to have a lot of code issues reported to you.This patch provides a 'flake8' tox environement to easily install andrun the utility on the code base. One simply has to: tox -eflake8The env has been added to the default list of environement to haveflake8 run by default.The repository in its current state does not pass checks but I noticed apull request fixing pep8 issues. We can later easily ensure there is noregression by adjusting Travis configuration to run this env.More informations about flake8:https://pypi.python.org/pypi/flake8
That is against branch 0.3. |
coveralls commentedJul 25, 2014
Byron added a commit that referenced this pull requestNov 14, 2014
Make tox available, see#179[skip ci]
Thank you ! |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tox is a very nice thin wrapper around virtualenv which make it very easy
to run tests.
I have normalized the list of dependencies to .txt files and created the
needed tox configuration. One can then run tests using:
tox
Super easy.
Left to be done: integrate coveralls as a tox env and adjust Travis conf.