blob: dc8811af7b99e16f0d2e1e9998663e818e42f731 [file] [log] [blame]
Alex Gaynor0f66c6d2013-08-07 12:18:02 -07001[tox]
Alex Gaynor5b8126f2014-05-17 22:34:56 -07002envlist = py26,py27,pypy,py32,py33,py34,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 Gaynorfb8adfc2013-10-31 14:16:24 -070010 pytest
Alex Stapleton3888a842014-03-24 23:05:53 +000011 ./vectors
Alex Gaynorff61cd32013-10-03 09:52:08 -070012commands =
Donald Stufft62143e42014-11-13 08:17:36 -050013 # We use parallel mode and then combine here so that coverage.py will take
14 # the paths like .tox/py34/lib/python3.4/site-packages/cryptography/__init__.py
15 # and collapse them into src/cryptography/__init__.py.
16 coverage run --parallel-mode -m pytest --capture=no --strict {posargs}
17 coverage combine
Alex Gaynor3e81fb22013-11-05 16:29:19 -080018 coverage report -m
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070019
20[testenv:docs]
Alex Gaynor13ec4792013-11-08 14:09:21 -080021deps =
Ayrxa417b842014-05-20 23:53:40 +080022 doc8
Alex Gaynor29b40ea2014-01-10 09:00:12 -080023 pyenchant
Donald Stufft942e91d2015-02-12 21:39:51 -050024 readme>=0.5.1
Alex Gaynor13ec4792013-11-08 14:09:21 -080025 sphinx
26 sphinx_rtd_theme
Alex Stapleton89917f12014-03-22 10:18:15 +000027 sphinxcontrib-spelling
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070028basepython = python2.7
Donald Stufft235fa712013-08-11 17:47:17 -040029commands =
30 sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
Alex Gaynor960cf5e2013-12-15 10:24:35 -080031 sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex
Donald Stufft235fa712013-08-11 17:47:17 -040032 sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
Paul Kehrercd34ca62014-09-29 15:20:43 -050033 sphinx-build -W -b spelling docs docs/_build/html
Paul Kehrerb525adf2014-09-29 15:18:23 -050034 doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/
Donald Stufft942e91d2015-02-12 21:39:51 -050035 python setup.py check --restructuredtext --strict
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070036
Paul Kehrer986b1902014-03-02 16:35:21 -040037[testenv:docs-linkcheck]
38deps =
39 sphinx
40basepython = python2.7
41commands =
42 sphinx-build -W -b linkcheck docs docs/_build/html
43
David Reid46cb6012013-10-31 15:53:59 -070044# Temporarily disable coverage on pypy because of performance problems with
45# coverage.py on pypy.
46[testenv:pypy]
Alex Stapletona39a3192014-03-14 20:03:12 +000047commands =
Alex Stapletona39a3192014-03-14 20:03:12 +000048 py.test --capture=no --strict {posargs}
David Reid46cb6012013-10-31 15:53:59 -070049
Paul Kehrerdefa4602014-12-23 13:00:23 -060050# Temporarily disable coverage on pypy3 because of performance problems with
51# coverage.py on pypy3.
52[testenv:pypy3]
53commands =
54 py.test --capture=no --strict {posargs}
55
Alex Gaynor0f66c6d2013-08-07 12:18:02 -070056[testenv:pep8]
Alex Gaynor25693232014-03-04 15:02:33 -080057deps =
58 flake8
Alex Stapletonbafceb62014-03-22 08:50:07 +000059 flake8-import-order
Alex Stapleton89917f12014-03-22 10:18:15 +000060 pep8-naming
Alex Gaynor5b8126f2014-05-17 22:34:56 -070061commands =
62 flake8 .
Alex Gaynor967c03b2013-10-21 20:22:50 -070063
Alex Gaynorc510e492013-10-31 11:37:11 -070064[testenv:py3pep8]
Alex Gaynor7b62cca2014-05-18 12:31:59 -070065basepython = python3.3
Alex Gaynor25693232014-03-04 15:02:33 -080066deps =
67 flake8
Alex Stapletonbafceb62014-03-22 08:50:07 +000068 flake8-import-order
Alex Stapleton89917f12014-03-22 10:18:15 +000069 pep8-naming
Alex Gaynord8387832014-05-17 22:35:16 -070070commands =
71 flake8 .
Alex Gaynorc510e492013-10-31 11:37:11 -070072
Paul Kehrer1ecc7f12014-11-20 19:47:12 -100073[testenv:randomorder]
74deps =
75 {[testenv]deps}
76 pytest-random
77commands =
78 py.test --capture=no --strict --random {posargs}
79
Alex Gaynor967c03b2013-10-21 20:22:50 -070080[flake8]
Alex Gaynor1d805382013-10-21 20:44:52 -070081exclude = .tox,*.egg
Alex Stapletonbafceb62014-03-22 08:50:07 +000082select = E,W,F,N,I
Alex Stapleton707b0082014-04-20 22:24:41 +010083application-import-names = cryptography,cryptography_vectors,tests
Alex Gaynor95f2c2b2014-08-19 16:18:01 -070084
85[doc8]
86extensions = rst
Terry Chia36b35b12014-12-14 15:32:16 +080087
88[pytest]
89addopts = -r s
90markers =
91 requires_backend_interface: this test requires a specific backend interface
92 supported: parametrized test requiring only_if and skip_message