blob: c8b3e76acd27d605e9cb5f477e128f7b498ff4d1 [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]
Alex Gaynor83a0f482013-08-10 15:48:57 -04005deps =
Alex Gaynorff61cd32013-10-03 09:52:08 -07006 coverage
Alex Gaynor4efd3f92016-01-17 23:03:11 -05007 .[test]
Alex Stapleton3888a842014-03-24 23:05:53 +00008 ./vectors
Paul Kehrer9b6ae9c2015-09-15 18:30:55 -05009passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME
Alex Gaynor99120332016-03-19 11:11:27 -040010setenv =
11 CRYPTOGRAPHY_ALLOW_OPENSSL_098=1
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
21[testenv:docs]
Alex Gaynor13ec4792013-11-08 14:09:21 -080022deps =
Paul Kehrerc6c3b6d2016-05-29 00:17:08 -050023 .[docstest]
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070024basepython = python2.7
Donald Stufft235fa712013-08-11 17:47:17 -040025commands =
26 sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Alex Gaynor960cf5e2013-12-15 10:24:35 -080027 sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex
Donald Stufft235fa712013-08-11 17:47:17 -040028 sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
Paul Kehrercd34ca62014-09-29 15:20:43 -050029 sphinx-build -W -b spelling docs docs/_build/html
Paul Kehrerb525adf2014-09-29 15:18:23 -050030 doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/
Donald Stufft942e91d2015-02-12 21:39:51 -050031 python setup.py check --restructuredtext --strict
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070032
Paul Kehrer986b1902014-03-02 16:35:21 -040033[testenv:docs-linkcheck]
34deps =
35 sphinx
36basepython = python2.7
37commands =
38 sphinx-build -W -b linkcheck docs docs/_build/html
39
Paul Kehrer1dafc3f2016-01-03 21:09:22 -060040# This target disables coverage on pypy because of performance problems with
David Reid46cb6012013-10-31 15:53:59 -070041# coverage.py on pypy.
Paul Kehrer1dafc3f2016-01-03 21:09:22 -060042[testenv:pypy-nocoverage]
Paul Kehrer030c4ac2016-01-03 21:22:05 -060043basepython = pypy
Paul Kehrerdefa4602014-12-23 13:00:23 -060044commands =
Paul Kehrer7cf4c302015-06-06 08:45:09 -050045 pip list
Paul Kehrerdefa4602014-12-23 13:00:23 -060046 py.test --capture=no --strict {posargs}
47
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070048[testenv:pep8]
Alex Gaynor25693232014-03-04 15:02:33 -080049deps =
Paul Kehrerc6c3b6d2016-05-29 00:17:08 -050050 .[pep8test]
Alex Gaynor5b8126f2014-05-17 22:34:56 -070051commands =
52 flake8 .
Alex Gaynor967c03b2013-10-21 20:22:50 -070053
Alex Gaynorc510e492013-10-31 11:37:11 -070054[testenv:py3pep8]
Terry Chiaac85fa92015-08-16 13:55:46 +080055basepython = python3
Alex Gaynor25693232014-03-04 15:02:33 -080056deps =
Paul Kehrerc6c3b6d2016-05-29 00:17:08 -050057 .[pep8test]
Alex Gaynord8387832014-05-17 22:35:16 -070058commands =
59 flake8 .
Alex Gaynorc510e492013-10-31 11:37:11 -070060
Paul Kehrer1ecc7f12014-11-20 19:47:12 -100061[testenv:randomorder]
62deps =
63 {[testenv]deps}
64 pytest-random
65commands =
66 py.test --capture=no --strict --random {posargs}
67
Alex Gaynor967c03b2013-10-21 20:22:50 -070068[flake8]
Terry Chia5cec1bf2015-03-22 11:49:08 +080069exclude = .tox,*.egg,.git,_build,.hypothesis
Alex Stapletonbafceb62014-03-22 08:50:07 +000070select = E,W,F,N,I
Alex Stapleton707b0082014-04-20 22:24:41 +010071application-import-names = cryptography,cryptography_vectors,tests
Alex Gaynor95f2c2b2014-08-19 16:18:01 -070072
73[doc8]
74extensions = rst
Terry Chia36b35b12014-12-14 15:32:16 +080075
76[pytest]
77addopts = -r s
78markers =
79 requires_backend_interface: this test requires a specific backend interface
80 supported: parametrized test requiring only_if and skip_message