blob: 90a4c6aadd16a58397de221ebbe84f9270da4e43 [file] [log] [blame]
Jean-Paul Calderone26f2c342014-01-10 14:09:40 -05001[tox]
Christian Claussac686812020-11-29 22:46:45 +01002envlist = {pypy,pypy3,py27,py35,py36,py37,py38,py39}{,-cryptographyMaster,-cryptographyMinimum}{,-randomorder},py37-twistedMaster,pypi-readme,check-manifest,flake8,docs,coverage-report
Jean-Paul Calderone26f2c342014-01-10 14:09:40 -05003
4[testenv]
Hynek Schlawack1b8135b2015-05-14 16:52:56 +02005whitelist_externals =
6 openssl
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +02007passenv = ARCHFLAGS CFLAGS LC_ALL LDFLAGS PATH LD_LIBRARY_PATH TERM
Paul Kehrer4fbc11d2017-07-06 23:00:14 -05008extras =
9 test
Hynek Schlawack434a6ad2015-04-14 19:22:17 -040010deps =
Hynek Schlawack17f47bb2016-07-31 14:36:59 +020011 coverage>=4.2
Hynek Schlawack9f925dc2015-05-04 17:41:57 +020012 cryptographyMaster: git+https://github.com/pyca/cryptography.git
Alex Gaynor124a0132020-10-27 00:15:17 -040013 cryptographyMinimum: cryptography==3.2
Alex Gaynor1265b062019-06-02 20:16:24 -050014 randomorder: pytest-randomly
Jean-Paul Calderone35d93a42014-01-10 14:32:58 -050015setenv =
Hynek Schlawackf0e66852015-10-16 20:18:38 +020016 # Do not allow the executing environment to pollute the test environment
Jean-Paul Calderone35d93a42014-01-10 14:32:58 -050017 # with extra packages.
18 PYTHONPATH=
Hynek Schlawack0c21cbd2015-12-11 13:29:39 +010019 PIP_NO_BINARY=cryptography
Hynek Schlawack434a6ad2015-04-14 19:22:17 -040020commands =
Hynek Schlawack57c22042015-05-14 16:31:13 +020021 openssl version
Hynek Schlawackd52975c2017-05-13 17:44:27 +020022 coverage run --parallel -m OpenSSL.debug
Alex Chan6b69c552016-10-24 16:34:41 +010023 coverage run --parallel -m pytest -v {posargs}
Laurens Van Houtvenade80a12014-06-19 18:07:01 +020024
Alex Gaynord65d7642020-03-30 20:39:49 -040025[testenv:py37-twistedMaster]
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +020026deps =
Alex Gaynor1bba14b2020-10-14 15:20:10 -040027 Twisted[all_non_platform] @ git+https://github.com/twisted/twisted
Alex Gaynord65d7642020-03-30 20:39:49 -040028setenv =
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +020029passenv = ARCHFLAGS CFLAGS LC_ALL LDFLAGS PATH LD_LIBRARY_PATH TERM
30commands =
31 python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"
32 python -c "import cryptography; print(cryptography.__version__)"
Cory Benfieldf189de92016-11-28 10:29:10 +000033 python -m twisted.trial --reporter=text twisted
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +020034
Laurens Van Houtven8aea6942015-05-18 10:55:33 -070035[testenv:flake8]
Alex Gaynor03737182020-07-23 20:40:46 -040036basepython = python3
Laurens Van Houtvenade80a12014-06-19 18:07:01 +020037deps =
Alex Gaynor03737182020-07-23 20:40:46 -040038 black
39 flake8
Hynek Schlawack5e63fd32016-01-06 14:14:34 +010040skip_install = true
Laurens Van Houtvenade80a12014-06-19 18:07:01 +020041commands =
Alex Gaynor03737182020-07-23 20:40:46 -040042 black --check .
Christian Claussac686812020-11-29 22:46:45 +010043 flake8 .
Laurens Van Houtvenca1842f2015-05-14 13:29:31 -070044
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020045[testenv:pypi-readme]
46deps =
Hynek Schlawack5e63fd32016-01-06 14:14:34 +010047 readme_renderer
48skip_install = true
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020049commands =
50 python setup.py check -r -s
Hynek Schlawack59365192015-05-05 18:44:49 +020051
52[testenv:check-manifest]
53deps =
54 check-manifest
Hynek Schlawack5e63fd32016-01-06 14:14:34 +010055skip_install = true
Hynek Schlawack59365192015-05-05 18:44:49 +020056commands =
57 check-manifest
Laurens Van Houtven8b53c782015-05-26 10:45:52 -070058
59[testenv:docs]
Paul Kehrer4fbc11d2017-07-06 23:00:14 -050060extras =
61 docs
Laurens Van Houtven8b53c782015-05-26 10:45:52 -070062basepython = python2.7
63commands =
64 sphinx-build -W -b html doc doc/_build/html
Hynek Schlawackf0e66852015-10-16 20:18:38 +020065
Hynek Schlawackf0e66852015-10-16 20:18:38 +020066[testenv:coverage-report]
Hynek Schlawack17f47bb2016-07-31 14:36:59 +020067deps = coverage>=4.2
Hynek Schlawackf0e66852015-10-16 20:18:38 +020068skip_install = true
69commands =
70 coverage combine
71 coverage report
Alex Gaynor03737182020-07-23 20:40:46 -040072
73[flake8]
74ignore = E203,W503,W504