Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork941
Commit2ddd5e5
committed
Use tox to easily run tests in venv
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.1 parentdbd784b commit2ddd5e5
4 files changed
+32
-1
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| 12 | + | |
| 13 | + | |
| 14 | + |
Lines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
16 | 17 |
| |
17 |
| - | |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 |
| |
36 | 47 |
| |
37 | 48 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + |
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + |
0 commit comments
Comments
(0)