Skip to content

Conversation

@hashar
Copy link
Contributor

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.

hashar added 3 commits July 25, 2014 10:54
More and more packages are listing their dependencies in requirements.txt which make it trivial to maintain and install them.
tox https://pypi.python.org/pypi/tox is a thin wrapper around virtualenv which let you craft a fresh python environement to execute command in. It creates the env with virtualenv, install dependencies, run python setup.py install in it and then execute whatever command you want it to do 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 dependencies To run tests simply: pip install tox && tox That will execute the test command 'nosetests' using python2.6 and then python 2.7. The additional env 'cover' can be run using: tox -ecover.
Most people know about pep8 which enforce coding style. pyflakes goes a step beyond by analyzing the code. flake8 is basically a wrapper around both pep8 and pyflakes and comes with some additional checks. I find it very useful since you only need to require one package to have a lot of code issues reported to you. This patch provides a 'flake8' tox environement to easily install and run the utility on the code base. One simply has to: tox -eflake8 The env has been added to the default list of environement to have flake8 run by default. The repository in its current state does not pass checks but I noticed a pull request fixing pep8 issues. We can later easily ensure there is no regression by adjusting Travis configuration to run this env. More informations about flake8: https://pypi.python.org/pypi/flake8
@hashar
Copy link
ContributorAuthor

That is against branch 0.3.

@coveralls
Copy link

Coverage Status

Coverage decreased (-12.21%) when pulling d43055d on hashar:tox into 27c577d on gitpython-developers:0.3.

@ByronByron merged commit d43055d into gitpython-developers:0.3Nov 14, 2014
Byron added a commit that referenced this pull request Nov 14, 2014
Make tox available, see #179 [skip ci]
@ByronByron added this to the v0.3.3 milestone Nov 14, 2014
@Byron
Copy link
Member

Thank you !

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hashar@coveralls@Byron