You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: README.md
+12-1
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,9 @@ The object database implementation is optimized for handling large quantities of
13
13
- Tested with nose 1.3.0
14
14
* Mock by Michael Foord used for tests
15
15
- Tested with 1.0.1
16
+
* Coverage - used for tests coverage
16
17
17
-
The list of dependencies are listed in /requirements.txt. The installer takes care of installing them for you though.
18
+
The list of dependencies are listed in /requirements.txt and /test-requirements.txt. The installer takes care of installing them for you though.
18
19
19
20
### INSTALL
20
21
@@ -32,6 +33,16 @@ A distribution package can be obtained for manual installation at:
32
33
33
34
http://pypi.python.org/pypi/GitPython
34
35
36
+
### RUNNING TESTS
37
+
38
+
The easiest way to run test is by using [tox](https://pypi.python.org/pypi/tox) a wrapper around virtualenv. It will take care of setting up environnements with the proper dependencies installed and execute test commands. To install it simply:
0 commit comments