Craig Citro | 40fe6a0 | 2014-08-21 19:10:45 -0700 | [diff] [blame] | 1 | [tox] |
Craig Citro | a4f9f60 | 2016-03-16 14:27:51 -0700 | [diff] [blame] | 2 | envlist = py26,py27,pypy,py34,py35,lint,cover,py27oldoauth2client |
Craig Citro | 40fe6a0 | 2014-08-21 19:10:45 -0700 | [diff] [blame] | 3 | |
| 4 | [testenv] |
Arthur D. Cherba | e59816f | 2016-09-30 08:27:33 -0400 | [diff] [blame] | 5 | deps = |
| 6 | nose |
| 7 | python-gflags==3.0.6 |
Tres Seaver | 3f015e9 | 2014-10-08 14:49:06 -0400 | [diff] [blame] | 8 | commands = |
Tres Seaver | d143231 | 2014-11-26 22:45:52 -0500 | [diff] [blame] | 9 | pip install google-apitools[testing] |
Craig Citro | 3edef91 | 2015-05-24 23:26:45 -0700 | [diff] [blame] | 10 | nosetests [] |
Craig Citro | 22f1865 | 2015-10-28 14:40:23 -0700 | [diff] [blame] | 11 | passenv = TRAVIS* |
Danny Hermes | 1ec0080 | 2015-03-24 16:08:51 -0700 | [diff] [blame] | 12 | |
Craig Citro | a4f9f60 | 2016-03-16 14:27:51 -0700 | [diff] [blame] | 13 | [testenv:py27oldoauth2client] |
| 14 | commands = |
| 15 | pip install oauth2client==1.5.2 |
| 16 | {[testenv]commands} |
| 17 | deps = {[testenv]deps} |
| 18 | |
Craig Citro | 8ecaced | 2016-02-22 22:02:42 -0800 | [diff] [blame] | 19 | [testenv:py34] |
| 20 | basepython = python3.4 |
Danny Hermes | 1ec0080 | 2015-03-24 16:08:51 -0700 | [diff] [blame] | 21 | deps = |
| 22 | mock |
| 23 | nose |
| 24 | unittest2 |
Craig Citro | 3edef91 | 2015-05-24 23:26:45 -0700 | [diff] [blame] | 25 | commands = nosetests [] |
Danny Hermes | 1ec0080 | 2015-03-24 16:08:51 -0700 | [diff] [blame] | 26 | |
Craig Citro | 8ecaced | 2016-02-22 22:02:42 -0800 | [diff] [blame] | 27 | [testenv:py35] |
| 28 | basepython = python3.5 |
Danny Hermes | 1ec0080 | 2015-03-24 16:08:51 -0700 | [diff] [blame] | 29 | deps = |
| 30 | mock |
| 31 | nose |
| 32 | unittest2 |
Craig Citro | 3edef91 | 2015-05-24 23:26:45 -0700 | [diff] [blame] | 33 | commands = nosetests [] |
Danny Hermes | 9a0e3ca | 2015-03-24 18:15:51 -0700 | [diff] [blame] | 34 | |
Craig Citro | 4572ff0 | 2015-05-01 09:14:07 -0700 | [diff] [blame] | 35 | [pep8] |
Arthur D. Cherba | 9edd3a7 | 2016-05-31 12:00:19 -0400 | [diff] [blame] | 36 | exclude = samples/*_sample/*/*,*/testdata/*,*.egg/,*.egg-info/,.*/,ez_setup.py,build |
Craig Citro | 4572ff0 | 2015-05-01 09:14:07 -0700 | [diff] [blame] | 37 | verbose = 1 |
| 38 | |
| 39 | [testenv:lint] |
| 40 | basepython = |
| 41 | python2.7 |
| 42 | commands = |
Arthur D. Cherba | 518feea | 2016-01-01 12:42:55 -0500 | [diff] [blame] | 43 | pip install six google-apitools[testing] |
Craig Citro | 4572ff0 | 2015-05-01 09:14:07 -0700 | [diff] [blame] | 44 | pep8 |
Arthur D. Cherba | 518feea | 2016-01-01 12:42:55 -0500 | [diff] [blame] | 45 | python run_pylint.py |
Craig Citro | 4572ff0 | 2015-05-01 09:14:07 -0700 | [diff] [blame] | 46 | deps = |
| 47 | pep8 |
| 48 | pylint |
| 49 | unittest2 |
| 50 | |
Danny Hermes | 9a0e3ca | 2015-03-24 18:15:51 -0700 | [diff] [blame] | 51 | [testenv:cover] |
| 52 | basepython = |
| 53 | python2.7 |
| 54 | commands = |
Craig Citro | 3edef91 | 2015-05-24 23:26:45 -0700 | [diff] [blame] | 55 | nosetests --with-xunit --with-xcoverage --cover-package=apitools --nocapture --cover-erase --cover-tests --cover-branches [] |
Danny Hermes | 9a0e3ca | 2015-03-24 18:15:51 -0700 | [diff] [blame] | 56 | deps = |
| 57 | google-apputils |
Arthur D. Cherba | e59816f | 2016-09-30 08:27:33 -0400 | [diff] [blame] | 58 | python-gflags==3.0.6 |
Danny Hermes | 9a0e3ca | 2015-03-24 18:15:51 -0700 | [diff] [blame] | 59 | mock |
| 60 | nose |
| 61 | unittest2 |
| 62 | coverage |
| 63 | nosexcover |
| 64 | |
| 65 | [testenv:coveralls] |
| 66 | basepython = {[testenv:cover]basepython} |
| 67 | commands = |
| 68 | {[testenv:cover]commands} |
| 69 | coveralls |
| 70 | deps = |
| 71 | {[testenv:cover]deps} |
| 72 | coveralls |
Craig Citro | a680256 | 2015-07-26 13:29:21 -0700 | [diff] [blame] | 73 | |
| 74 | [testenv:transfer_coverage] |
| 75 | basepython = |
| 76 | python2.7 |
| 77 | deps = |
| 78 | mock |
| 79 | nose |
| 80 | unittest2 |
| 81 | coverage |
| 82 | commands = |
| 83 | coverage run --branch -p samples/storage_sample/downloads_test.py |
| 84 | coverage run --branch -p samples/storage_sample/uploads_test.py |
| 85 | coverage run --branch -p apitools/base/py/transfer_test.py |
| 86 | coverage combine |
| 87 | coverage html |