blob: 1c15abffc6e48745784f6e610b16d04039584548 [file] [log] [blame]
Alex Gaynor0f66c6d2013-08-07 12:18:02 -07001[tox]
Paul Kehrer4e91f7f2015-09-14 09:02:46 -05002envlist = py26,py27,pypy,py33,py34,py35,docs,pep8,py3pep8
Alex Gaynor0f66c6d2013-08-07 12:18:02 -07003
4[testenv]
Paul Kehrer7ad18bc2014-03-26 13:13:38 -06005# If you add a new dep here you probably need to add it in setup.py as well
Alex Gaynor83a0f482013-08-10 15:48:57 -04006deps =
Alex Gaynorff61cd32013-10-03 09:52:08 -07007 coverage
Alex Gaynorfb8adfc2013-10-31 14:16:24 -07008 iso8601
Alex Gaynor83a0f482013-08-10 15:48:57 -04009 pretend
Alex Gaynor959403b2015-09-19 13:19:43 -040010 pytest<2.8
Terry Chia5cec1bf2015-03-22 11:49:08 +080011 hypothesis
12 hypothesis-pytest
13 ./vectors
14passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
15commands =
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.
27deps =
28 coverage
29 iso8601
30 pretend
31 pytest<2.8
32 hypothesis
33 hypothesis-pytest
Alex Stapleton3888a842014-03-24 23:05:53 +000034 ./vectors
Paul Kehrer9b6ae9c2015-09-15 18:30:55 -050035passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
Alex Gaynorff61cd32013-10-03 09:52:08 -070036commands =
Paul Kehrer7cf4c302015-06-06 08:45:09 -050037 pip list
Paul Kehrer11491662015-05-26 07:57:10 -050038 python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())"
Donald Stufft62143e42014-11-13 08:17:36 -050039 # 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 Gaynor3e81fb22013-11-05 16:29:19 -080044 coverage report -m
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070045
46[testenv:docs]
Alex Gaynor13ec4792013-11-08 14:09:21 -080047deps =
Ayrxa417b842014-05-20 23:53:40 +080048 doc8
Alex Gaynor29b40ea2014-01-10 09:00:12 -080049 pyenchant
Donald Stufft942e91d2015-02-12 21:39:51 -050050 readme>=0.5.1
Alex Gaynor13ec4792013-11-08 14:09:21 -080051 sphinx
52 sphinx_rtd_theme
Alex Stapleton89917f12014-03-22 10:18:15 +000053 sphinxcontrib-spelling
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070054basepython = python2.7
Donald Stufft235fa712013-08-11 17:47:17 -040055commands =
56 sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Alex Gaynor960cf5e2013-12-15 10:24:35 -080057 sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex
Donald Stufft235fa712013-08-11 17:47:17 -040058 sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
Paul Kehrercd34ca62014-09-29 15:20:43 -050059 sphinx-build -W -b spelling docs docs/_build/html
Paul Kehrerb525adf2014-09-29 15:18:23 -050060 doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/
Donald Stufft942e91d2015-02-12 21:39:51 -050061 python setup.py check --restructuredtext --strict
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070062
Paul Kehrer986b1902014-03-02 16:35:21 -040063[testenv:docs-linkcheck]
64deps =
65 sphinx
66basepython = python2.7
67commands =
68 sphinx-build -W -b linkcheck docs docs/_build/html
69
David Reid46cb6012013-10-31 15:53:59 -070070# Temporarily disable coverage on pypy because of performance problems with
71# coverage.py on pypy.
72[testenv:pypy]
Alex Stapletona39a3192014-03-14 20:03:12 +000073commands =
Paul Kehrer7cf4c302015-06-06 08:45:09 -050074 pip list
Paul Kehrer11491662015-05-26 07:57:10 -050075 python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())"
Alex Stapletona39a3192014-03-14 20:03:12 +000076 py.test --capture=no --strict {posargs}
David Reid46cb6012013-10-31 15:53:59 -070077
Paul Kehrerdefa4602014-12-23 13:00:23 -060078# Temporarily disable coverage on pypy3 because of performance problems with
79# coverage.py on pypy3.
80[testenv:pypy3]
81commands =
Paul Kehrer7cf4c302015-06-06 08:45:09 -050082 pip list
Paul Kehrer11491662015-05-26 07:57:10 -050083 python -c "from cryptography.hazmat.backends.openssl.backend import backend; print(backend.openssl_version_text())"
Paul Kehrerdefa4602014-12-23 13:00:23 -060084 py.test --capture=no --strict {posargs}
85
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070086[testenv:pep8]
Alex Gaynor25693232014-03-04 15:02:33 -080087deps =
88 flake8
Alex Stapletonbafceb62014-03-22 08:50:07 +000089 flake8-import-order
Alex Stapleton89917f12014-03-22 10:18:15 +000090 pep8-naming
Alex Gaynor5b8126f2014-05-17 22:34:56 -070091commands =
92 flake8 .
Alex Gaynor967c03b2013-10-21 20:22:50 -070093
Alex Gaynorc510e492013-10-31 11:37:11 -070094[testenv:py3pep8]
Terry Chiaac85fa92015-08-16 13:55:46 +080095basepython = python3
Alex Gaynor25693232014-03-04 15:02:33 -080096deps =
97 flake8
Alex Stapletonbafceb62014-03-22 08:50:07 +000098 flake8-import-order
Alex Stapleton89917f12014-03-22 10:18:15 +000099 pep8-naming
Alex Gaynord8387832014-05-17 22:35:16 -0700100commands =
101 flake8 .
Alex Gaynorc510e492013-10-31 11:37:11 -0700102
Paul Kehrer1ecc7f12014-11-20 19:47:12 -1000103[testenv:randomorder]
104deps =
105 {[testenv]deps}
106 pytest-random
107commands =
108 py.test --capture=no --strict --random {posargs}
109
Alex Gaynor967c03b2013-10-21 20:22:50 -0700110[flake8]
Terry Chia5cec1bf2015-03-22 11:49:08 +0800111exclude = .tox,*.egg,.git,_build,.hypothesis
Alex Stapletonbafceb62014-03-22 08:50:07 +0000112select = E,W,F,N,I
Alex Stapleton707b0082014-04-20 22:24:41 +0100113application-import-names = cryptography,cryptography_vectors,tests
Alex Gaynor95f2c2b2014-08-19 16:18:01 -0700114
115[doc8]
116extensions = rst
Terry Chia36b35b12014-12-14 15:32:16 +0800117
118[pytest]
119addopts = -r s
120markers =
121 requires_backend_interface: this test requires a specific backend interface
122 supported: parametrized test requiring only_if and skip_message