forked from hynek/argon2-cffi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
104 lines (84 loc) · 2.33 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[flake8]
exclude = src/argon2/_ffi.py
ignore =
# Ambiguous variable names
# Ignored, since there is an enum value "I" for the algorithm type Argon2I
E741
# Not an actual PEP8 violation
W503
# Black vs flake8 conflict
E203
[pytest]
minversion = 3.0
strict = true
addopts = -ra --capture=no
testpaths = tests
filterwarnings =
once::Warning
[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37, docs
3.8: py38, lint, manifest, typing, changelog
pypy2: pypy2
pypy3: pypy3
[tox]
envlist = lint,py27,py35,py36,py37,py38,pypy,pypy3,system-argon2,docs,manifest,pypi-description,coverage-report
isolated_build = true
[testenv:lint]
description = Run all pre-commit hooks.
basepython = python3.8
skip_install = true
deps = pre-commit
passenv = HOMEPATH # needed on Windows
commands = pre-commit run --all-files --show-diff
[testenv]
description = Run tests and measure coverage.
extras = tests
commands =
coverage run --parallel -m pytest {posargs}
coverage run --parallel -m argon2 -n 1 -t 1 -m 8 -p 1
[testenv:system-argon2]
description = Run tests against bindings that use a system installation of Argon2.
basepython = python3.8
setenv = ARGON2_CFFI_USE_SYSTEM=1
extras = tests
install_command = pip install {opts} --no-binary=argon2-cffi {packages}
commands =
python -m pytest {posargs}
python -m argon2 -n 1 -t 1 -m 8 -p 1
[testenv:docs]
description = Build docs and run doctests.
# Keep basepython in sync with gh-actions and .readthedocs.yml.
basepython = python3.7
extras = docs
commands =
python -m doctest README.rst
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:manifest]
description = Ensure MANIFEST.in is up to date.
basepython = python3.8
deps = check-manifest
skip_install = true
commands = check-manifest
[testenv:pypi-description]
description = Ensure README.rst renders on PyPI.
basepython = python3.8
skip_install = true
deps =
twine
pip >= 18.0.0
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:coverage-report]
description = Report coverage over all test runs.
basepython = python3.8
deps = coverage[toml]>=5.0.2
skip_install = true
commands =
coverage combine
coverage report