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] |
Paul Kehrer | 7ad18bc | 2014-03-26 13:13:38 -0600 | [diff] [blame] | 5 | # If you add a new dep here you probably need to add it in setup.py as well |
Alex Gaynor | 83a0f48 | 2013-08-10 15:48:57 -0400 | [diff] [blame] | 6 | deps = |
Alex Gaynor | ff61cd3 | 2013-10-03 09:52:08 -0700 | [diff] [blame] | 7 | coverage |
Alex Gaynor | fb8adfc | 2013-10-31 14:16:24 -0700 | [diff] [blame] | 8 | iso8601 |
Alex Gaynor | 83a0f48 | 2013-08-10 15:48:57 -0400 | [diff] [blame] | 9 | pretend |
Alex Gaynor | 959403b | 2015-09-19 13:19:43 -0400 | [diff] [blame] | 10 | pytest<2.8 |
Terry Chia | 5cec1bf | 2015-03-22 11:49:08 +0800 | [diff] [blame^] | 11 | hypothesis |
| 12 | hypothesis-pytest |
| 13 | ./vectors |
| 14 | passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME |
| 15 | commands = |
| 16 | pip list |
| 17 | python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())" |
| 18 | # We use parallel mode and then combine here so that coverage.py will take |
| 19 | # the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py |
| 20 | # and collapse them into src/cryptography/__init__.py. |
| 21 | coverage run --parallel-mode -m pytest --capture=no --strict {posargs} |
| 22 | coverage combine |
| 23 | coverage report -m |
| 24 | |
| 25 | [testenv:py26] |
| 26 | # This mirrors the testenv minus the hypothesis and hypothesis-test deps. |
| 27 | deps = |
| 28 | coverage |
| 29 | iso8601 |
| 30 | pretend |
| 31 | pytest<2.8 |
| 32 | hypothesis |
| 33 | hypothesis-pytest |
Alex Stapleton | 3888a84 | 2014-03-24 23:05:53 +0000 | [diff] [blame] | 34 | ./vectors |
Paul Kehrer | 9b6ae9c | 2015-09-15 18:30:55 -0500 | [diff] [blame] | 35 | passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME |
Alex Gaynor | ff61cd3 | 2013-10-03 09:52:08 -0700 | [diff] [blame] | 36 | commands = |
Paul Kehrer | 7cf4c30 | 2015-06-06 08:45:09 -0500 | [diff] [blame] | 37 | pip list |
Paul Kehrer | 1149166 | 2015-05-26 07:57:10 -0500 | [diff] [blame] | 38 | python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())" |
Donald Stufft | 62143e4 | 2014-11-13 08:17:36 -0500 | [diff] [blame] | 39 | # We use parallel mode and then combine here so that coverage.py will take |
| 40 | # the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py |
| 41 | # and collapse them into src/cryptography/__init__.py. |
| 42 | coverage run --parallel-mode -m pytest --capture=no --strict {posargs} |
| 43 | coverage combine |
Alex Gaynor | 3e81fb2 | 2013-11-05 16:29:19 -0800 | [diff] [blame] | 44 | coverage report -m |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 45 | |
| 46 | [testenv:docs] |
Alex Gaynor | 13ec479 | 2013-11-08 14:09:21 -0800 | [diff] [blame] | 47 | deps = |
Ayrx | a417b84 | 2014-05-20 23:53:40 +0800 | [diff] [blame] | 48 | doc8 |
Alex Gaynor | 29b40ea | 2014-01-10 09:00:12 -0800 | [diff] [blame] | 49 | pyenchant |
Donald Stufft | 942e91d | 2015-02-12 21:39:51 -0500 | [diff] [blame] | 50 | readme>=0.5.1 |
Alex Gaynor | 13ec479 | 2013-11-08 14:09:21 -0800 | [diff] [blame] | 51 | sphinx |
| 52 | sphinx_rtd_theme |
Alex Stapleton | 89917f1 | 2014-03-22 10:18:15 +0000 | [diff] [blame] | 53 | sphinxcontrib-spelling |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 54 | basepython = python2.7 |
Donald Stufft | 235fa71 | 2013-08-11 17:47:17 -0400 | [diff] [blame] | 55 | commands = |
| 56 | sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html |
Alex Gaynor | 960cf5e | 2013-12-15 10:24:35 -0800 | [diff] [blame] | 57 | sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex |
Donald Stufft | 235fa71 | 2013-08-11 17:47:17 -0400 | [diff] [blame] | 58 | sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html |
Paul Kehrer | cd34ca6 | 2014-09-29 15:20:43 -0500 | [diff] [blame] | 59 | sphinx-build -W -b spelling docs docs/_build/html |
Paul Kehrer | b525adf | 2014-09-29 15:18:23 -0500 | [diff] [blame] | 60 | 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] | 61 | python setup.py check --restructuredtext --strict |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 62 | |
Paul Kehrer | 986b190 | 2014-03-02 16:35:21 -0400 | [diff] [blame] | 63 | [testenv:docs-linkcheck] |
| 64 | deps = |
| 65 | sphinx |
| 66 | basepython = python2.7 |
| 67 | commands = |
| 68 | sphinx-build -W -b linkcheck docs docs/_build/html |
| 69 | |
David Reid | 46cb601 | 2013-10-31 15:53:59 -0700 | [diff] [blame] | 70 | # Temporarily disable coverage on pypy because of performance problems with |
| 71 | # coverage.py on pypy. |
| 72 | [testenv:pypy] |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 73 | commands = |
Paul Kehrer | 7cf4c30 | 2015-06-06 08:45:09 -0500 | [diff] [blame] | 74 | pip list |
Paul Kehrer | 1149166 | 2015-05-26 07:57:10 -0500 | [diff] [blame] | 75 | python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())" |
Alex Stapleton | a39a319 | 2014-03-14 20:03:12 +0000 | [diff] [blame] | 76 | py.test --capture=no --strict {posargs} |
David Reid | 46cb601 | 2013-10-31 15:53:59 -0700 | [diff] [blame] | 77 | |
Paul Kehrer | defa460 | 2014-12-23 13:00:23 -0600 | [diff] [blame] | 78 | # Temporarily disable coverage on pypy3 because of performance problems with |
| 79 | # coverage.py on pypy3. |
| 80 | [testenv:pypy3] |
| 81 | commands = |
Paul Kehrer | 7cf4c30 | 2015-06-06 08:45:09 -0500 | [diff] [blame] | 82 | pip list |
Paul Kehrer | 1149166 | 2015-05-26 07:57:10 -0500 | [diff] [blame] | 83 | python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())" |
Paul Kehrer | defa460 | 2014-12-23 13:00:23 -0600 | [diff] [blame] | 84 | py.test --capture=no --strict {posargs} |
| 85 | |
Alex Gaynor | 0f66c6d | 2013-08-07 12:18:02 -0700 | [diff] [blame] | 86 | [testenv:pep8] |
Alex Gaynor | 2569323 | 2014-03-04 15:02:33 -0800 | [diff] [blame] | 87 | deps = |
| 88 | flake8 |
Alex Stapleton | bafceb6 | 2014-03-22 08:50:07 +0000 | [diff] [blame] | 89 | flake8-import-order |
Alex Stapleton | 89917f1 | 2014-03-22 10:18:15 +0000 | [diff] [blame] | 90 | pep8-naming |
Alex Gaynor | 5b8126f | 2014-05-17 22:34:56 -0700 | [diff] [blame] | 91 | commands = |
| 92 | flake8 . |
Alex Gaynor | 967c03b | 2013-10-21 20:22:50 -0700 | [diff] [blame] | 93 | |
Alex Gaynor | c510e49 | 2013-10-31 11:37:11 -0700 | [diff] [blame] | 94 | [testenv:py3pep8] |
Terry Chia | ac85fa9 | 2015-08-16 13:55:46 +0800 | [diff] [blame] | 95 | basepython = python3 |
Alex Gaynor | 2569323 | 2014-03-04 15:02:33 -0800 | [diff] [blame] | 96 | deps = |
| 97 | flake8 |
Alex Stapleton | bafceb6 | 2014-03-22 08:50:07 +0000 | [diff] [blame] | 98 | flake8-import-order |
Alex Stapleton | 89917f1 | 2014-03-22 10:18:15 +0000 | [diff] [blame] | 99 | pep8-naming |
Alex Gaynor | d838783 | 2014-05-17 22:35:16 -0700 | [diff] [blame] | 100 | commands = |
| 101 | flake8 . |
Alex Gaynor | c510e49 | 2013-10-31 11:37:11 -0700 | [diff] [blame] | 102 | |
Paul Kehrer | 1ecc7f1 | 2014-11-20 19:47:12 -1000 | [diff] [blame] | 103 | [testenv:randomorder] |
| 104 | deps = |
| 105 | {[testenv]deps} |
| 106 | pytest-random |
| 107 | commands = |
| 108 | py.test --capture=no --strict --random {posargs} |
| 109 | |
Alex Gaynor | 967c03b | 2013-10-21 20:22:50 -0700 | [diff] [blame] | 110 | [flake8] |
Terry Chia | 5cec1bf | 2015-03-22 11:49:08 +0800 | [diff] [blame^] | 111 | exclude = .tox,*.egg,.git,_build,.hypothesis |
Alex Stapleton | bafceb6 | 2014-03-22 08:50:07 +0000 | [diff] [blame] | 112 | select = E,W,F,N,I |
Alex Stapleton | 707b008 | 2014-04-20 22:24:41 +0100 | [diff] [blame] | 113 | application-import-names = cryptography,cryptography_vectors,tests |
Alex Gaynor | 95f2c2b | 2014-08-19 16:18:01 -0700 | [diff] [blame] | 114 | |
| 115 | [doc8] |
| 116 | extensions = rst |
Terry Chia | 36b35b1 | 2014-12-14 15:32:16 +0800 | [diff] [blame] | 117 | |
| 118 | [pytest] |
| 119 | addopts = -r s |
| 120 | markers = |
| 121 | requires_backend_interface: this test requires a specific backend interface |
| 122 | supported: parametrized test requiring only_if and skip_message |