Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 1 | [tox] |
Paul Kehrer | 4e91f7f | 2015-09-14 09:02:46 -0500 | [diff] [blame] | 2 | envlist = py26,py27,pypy,py33,py34,py35,docs,pep8,py3pep8 |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 3 | |
| 4 | [testenv] |
Alex Gaynor | 83a0f48 | 2013-08-10 15:48:57 -0400 | [diff] [blame] | 5 | deps = |
Alex Gaynor | ff61cd3 | 2013-10-03 09:52:08 -0700 | [diff] [blame] | 6 | coverage |
Alex Gaynor | 4efd3f9 | 2016-01-17 23:03:11 -0500 | [diff] [blame] | 7 | .[test] |
Alex Stapleton | 3888a84 | 2014-03-24 23:05:53 +0000 | [diff] [blame] | 8 | ./vectors |
Paul Kehrer | 9b6ae9c | 2015-09-15 18:30:55 -0500 | [diff] [blame] | 9 | passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME |
Alex Gaynor | ff61cd3 | 2013-10-03 09:52:08 -0700 | [diff] [blame] | 10 | commands = |
Paul Kehrer | 7cf4c30 | 2015-06-06 08:45:09 -0500 | [diff] [blame] | 11 | pip list |
Donald Stufft | 62143e4 | 2014-11-13 08:17:36 -0500 | [diff] [blame] | 12 | # We use parallel mode and then combine here so that coverage.py will take |
| 13 | # the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py |
| 14 | # and collapse them into src/cryptography/__init__.py. |
| 15 | coverage run --parallel-mode -m pytest --capture=no --strict {posargs} |
| 16 | coverage combine |
Alex Gaynor | 3e81fb2 | 2013-11-05 16:29:19 -0800 | [diff] [blame] | 17 | coverage report -m |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 18 | |
| 19 | [testenv:docs] |
Alex Gaynor | 13ec479 | 2013-11-08 14:09:21 -0800 | [diff] [blame] | 20 | deps = |
Paul Kehrer | c6c3b6d | 2016-05-29 00:17:08 -0500 | [diff] [blame] | 21 | .[docstest] |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 22 | basepython = python2.7 |
Donald Stufft | 235fa71 | 2013-08-11 17:47:17 -0400 | [diff] [blame] | 23 | commands = |
| 24 | sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html |
Alex Gaynor | 960cf5e | 2013-12-15 10:24:35 -0800 | [diff] [blame] | 25 | sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex |
Donald Stufft | 235fa71 | 2013-08-11 17:47:17 -0400 | [diff] [blame] | 26 | sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html |
Paul Kehrer | cd34ca6 | 2014-09-29 15:20:43 -0500 | [diff] [blame] | 27 | sphinx-build -W -b spelling docs docs/_build/html |
Paul Kehrer | b525adf | 2014-09-29 15:18:23 -0500 | [diff] [blame] | 28 | doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/ |
Donald Stufft | 942e91d | 2015-02-12 21:39:51 -0500 | [diff] [blame] | 29 | python setup.py check --restructuredtext --strict |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 30 | |
Paul Kehrer | 986b190 | 2014-03-02 16:35:21 -0400 | [diff] [blame] | 31 | [testenv:docs-linkcheck] |
| 32 | deps = |
| 33 | sphinx |
| 34 | basepython = python2.7 |
| 35 | commands = |
| 36 | sphinx-build -W -b linkcheck docs docs/_build/html |
| 37 | |
Paul Kehrer | 1dafc3f | 2016-01-03 21:09:22 -0600 | [diff] [blame] | 38 | # This target disables coverage on pypy because of performance problems with |
David Reid | 46cb601 | 2013-10-31 15:53:59 -0700 | [diff] [blame] | 39 | # coverage.py on pypy. |
Paul Kehrer | 1dafc3f | 2016-01-03 21:09:22 -0600 | [diff] [blame] | 40 | [testenv:pypy-nocoverage] |
Paul Kehrer | 030c4ac | 2016-01-03 21:22:05 -0600 | [diff] [blame] | 41 | basepython = pypy |
Paul Kehrer | defa460 | 2014-12-23 13:00:23 -0600 | [diff] [blame] | 42 | commands = |
Paul Kehrer | 7cf4c30 | 2015-06-06 08:45:09 -0500 | [diff] [blame] | 43 | pip list |
Paul Kehrer | defa460 | 2014-12-23 13:00:23 -0600 | [diff] [blame] | 44 | py.test --capture=no --strict {posargs} |
| 45 | |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 46 | [testenv:pep8] |
Alex Gaynor | 2569323 | 2014-03-04 15:02:33 -0800 | [diff] [blame] | 47 | deps = |
Paul Kehrer | c6c3b6d | 2016-05-29 00:17:08 -0500 | [diff] [blame] | 48 | .[pep8test] |
Alex Gaynor | 5b8126f | 2014-05-17 22:34:56 -0700 | [diff] [blame] | 49 | commands = |
| 50 | flake8 . |
Alex Gaynor | 967c03b | 2013-10-21 20:22:50 -0700 | [diff] [blame] | 51 | |
Alex Gaynor | c510e49 | 2013-10-31 11:37:11 -0700 | [diff] [blame] | 52 | [testenv:py3pep8] |
Terry Chia | ac85fa9 | 2015-08-16 13:55:46 +0800 | [diff] [blame] | 53 | basepython = python3 |
Alex Gaynor | 2569323 | 2014-03-04 15:02:33 -0800 | [diff] [blame] | 54 | deps = |
Paul Kehrer | c6c3b6d | 2016-05-29 00:17:08 -0500 | [diff] [blame] | 55 | .[pep8test] |
Alex Gaynor | d838783 | 2014-05-17 22:35:16 -0700 | [diff] [blame] | 56 | commands = |
| 57 | flake8 . |
Alex Gaynor | c510e49 | 2013-10-31 11:37:11 -0700 | [diff] [blame] | 58 | |
Paul Kehrer | 1ecc7f1 | 2014-11-20 19:47:12 -1000 | [diff] [blame] | 59 | [testenv:randomorder] |
| 60 | deps = |
| 61 | {[testenv]deps} |
| 62 | pytest-random |
| 63 | commands = |
| 64 | py.test --capture=no --strict --random {posargs} |
| 65 | |
Alex Gaynor | 967c03b | 2013-10-21 20:22:50 -0700 | [diff] [blame] | 66 | [flake8] |
Terry Chia | 5cec1bf | 2015-03-22 11:49:08 +0800 | [diff] [blame] | 67 | exclude = .tox,*.egg,.git,_build,.hypothesis |
Alex Stapleton | bafceb6 | 2014-03-22 08:50:07 +0000 | [diff] [blame] | 68 | select = E,W,F,N,I |
Alex Stapleton | 707b008 | 2014-04-20 22:24:41 +0100 | [diff] [blame] | 69 | application-import-names = cryptography,cryptography_vectors,tests |
Alex Gaynor | 95f2c2b | 2014-08-19 16:18:01 -0700 | [diff] [blame] | 70 | |
| 71 | [doc8] |
| 72 | extensions = rst |
Terry Chia | 36b35b1 | 2014-12-14 15:32:16 +0800 | [diff] [blame] | 73 | |
| 74 | [pytest] |
| 75 | addopts = -r s |
| 76 | markers = |
| 77 | requires_backend_interface: this test requires a specific backend interface |
| 78 | supported: parametrized test requiring only_if and skip_message |