blob: 89bcaae3f5970e6385cb52080a7aeea996fba451 [file] [log] [blame]
Alex Gaynor0f66c6d2013-08-07 12:18:02 -07001[tox]
Christian Heimesdbf18352016-11-30 13:33:02 +01002minversion = 2.4
Alex Gaynor31b5d782016-12-23 12:20:36 -05003envlist = py26,py27,pypy,py33,py34,py35,py36,docs,pep8,py3pep8
Alex Gaynor0f66c6d2013-08-07 12:18:02 -07004
5[testenv]
Chris Wolfe0b26ab22016-11-05 23:00:37 -05006extras =
7 test
Alex Gaynor83a0f482013-08-10 15:48:57 -04008deps =
Alex Gaynorff61cd32013-10-03 09:52:08 -07009 coverage
Alex Stapleton3888a842014-03-24 23:05:53 +000010 ./vectors
Paul Kehrer9b6ae9c2015-09-15 18:30:55 -050011passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
Alex Gaynorff61cd32013-10-03 09:52:08 -070012commands =
Paul Kehrer7cf4c302015-06-06 08:45:09 -050013 pip list
Donald Stufft62143e42014-11-13 08:17:36 -050014 # We use parallel mode and then combine here so that coverage.py will take
15 # the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py
16 # and collapse them into src/cryptography/__init__.py.
17 coverage run --parallel-mode -m pytest --capture=no --strict {posargs}
18 coverage combine
Alex Gaynor3e81fb22013-11-05 16:29:19 -080019 coverage report -m
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070020
Paul Kehrer63df0102017-06-19 00:59:13 -100021# This target disables coverage on pypy because of performance problems with
22# coverage.py on pypy.
23[testenv:pypy-nocoverage]
24basepython = pypy
25commands =
26 pip list
27 pytest --capture=no --strict {posargs}
28
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070029[testenv:docs]
Chris Wolfe0b26ab22016-11-05 23:00:37 -050030extras =
31 docstest
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070032basepython = python2.7
Donald Stufft235fa712013-08-11 17:47:17 -040033commands =
34 sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Alex Gaynor960cf5e2013-12-15 10:24:35 -080035 sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex
Donald Stufft235fa712013-08-11 17:47:17 -040036 sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
Paul Kehrercd34ca62014-09-29 15:20:43 -050037 sphinx-build -W -b spelling docs docs/_build/html
Paul Kehrerb525adf2014-09-29 15:18:23 -050038 doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/
Donald Stufft942e91d2015-02-12 21:39:51 -050039 python setup.py check --restructuredtext --strict
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070040
Paul Kehrer986b1902014-03-02 16:35:21 -040041[testenv:docs-linkcheck]
Paul Kehrer562b9a92016-11-13 05:46:04 -080042extras =
Paul Kehrer986b1902014-03-02 16:35:21 -040043deps =
44 sphinx
45basepython = python2.7
46commands =
47 sphinx-build -W -b linkcheck docs docs/_build/html
48
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070049[testenv:pep8]
Chris Wolfe0b26ab22016-11-05 23:00:37 -050050extras =
51 pep8test
Alex Gaynor5b8126f2014-05-17 22:34:56 -070052commands =
53 flake8 .
Alex Gaynor967c03b2013-10-21 20:22:50 -070054
Alex Gaynorc510e492013-10-31 11:37:11 -070055[testenv:py3pep8]
Terry Chiaac85fa92015-08-16 13:55:46 +080056basepython = python3
Chris Wolfe0b26ab22016-11-05 23:00:37 -050057extras =
58 pep8test
Alex Gaynord8387832014-05-17 22:35:16 -070059commands =
60 flake8 .
Alex Gaynorc510e492013-10-31 11:37:11 -070061
Paul Kehrer1ecc7f12014-11-20 19:47:12 -100062[testenv:randomorder]
63deps =
64 {[testenv]deps}
65 pytest-random
66commands =
67 py.test --capture=no --strict --random {posargs}
68
Alex Gaynor967c03b2013-10-21 20:22:50 -070069[flake8]
Terry Chia5cec1bf2015-03-22 11:49:08 +080070exclude = .tox,*.egg,.git,_build,.hypothesis
Alex Stapletonbafceb62014-03-22 08:50:07 +000071select = E,W,F,N,I
Alex Stapleton707b0082014-04-20 22:24:41 +010072application-import-names = cryptography,cryptography_vectors,tests
Alex Gaynor95f2c2b2014-08-19 16:18:01 -070073
74[doc8]
75extensions = rst
Terry Chia36b35b12014-12-14 15:32:16 +080076
77[pytest]
78addopts = -r s
79markers =
80 requires_backend_interface: this test requires a specific backend interface
81 supported: parametrized test requiring only_if and skip_message