1[tox] 2minversion = 2.4 3envlist = py27,pypy,py36,py37,py38,py39,docs,pep8,packaging 4isolated_build = True 5 6[testenv] 7extras = 8 test 9 ssh: ssh 10deps = 11 # This must be kept in sync with .github/workflows/ci.yml 12 coverage 13 ./vectors 14 randomorder: pytest-randomly 15passenv = ARCHFLAGS LDFLAGS CFLAGS INCLUDE LIB LD_LIBRARY_PATH USERNAME PYTHONIOENCODING OPENSSL_FORCE_FIPS_MODE 16commands = 17 pip list 18 # We use parallel mode and then combine here so that coverage.py will take 19 # the paths like .tox/py38/lib/python3.8/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# This target disables coverage on pypy because of performance problems with 26# coverage.py on pypy. 27[testenv:pypy-nocoverage] 28basepython = pypy 29commands = 30 pip list 31 pytest --capture=no --strict {posargs} 32 33# This target disables coverage on pypy because of performance problems with 34# coverage.py on pypy. 35[testenv:pypy3-nocoverage] 36basepython = pypy3 37commands = 38 pip list 39 pytest --capture=no --strict {posargs} 40 41[testenv:docs] 42extras = 43 docs 44 docstest 45basepython = python3 46commands = 47 sphinx-build -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html 48 sphinx-build -T -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex 49 sphinx-build -T -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html 50 sphinx-build -T -W -b spelling docs docs/_build/html 51 doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ --ignore-path docs/_build/ 52 python setup.py sdist 53 twine check dist/* 54 55[testenv:docs-linkcheck] 56extras = 57 docs 58basepython = python3 59commands = 60 sphinx-build -W -b linkcheck docs docs/_build/html 61 62[testenv:pep8] 63basepython = python3 64extras = 65 pep8test 66commands = 67 flake8 . 68 black --check . 69 70[testenv:packaging] 71deps = 72 check-manifest 73commands = 74 check-manifest 75 76[flake8] 77ignore = E203,E211,W503,W504 78exclude = .tox,*.egg,.git,_build,.hypothesis 79select = E,W,F,N,I 80application-import-names = cryptography,cryptography_vectors,tests 81 82[doc8] 83extensions = rst 84 85[pytest] 86addopts = -r s 87markers = 88 requires_backend_interface: this test requires a specific backend interface 89 skip_fips: this test is not executed in FIPS mode 90 supported: parametrized test requiring only_if and skip_message 91 wycheproof_tests: this test runs a wycheproof fixture 92