forked from cole/aiosmtplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
119 lines (106 loc) · 2.95 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[tox]
minversion = 3.10.0
requires =
setuptools >= 30.0.0
virtualenv >= 20.2
isolated_build = true
skip_missing_interpreters = true
envlist =
lint
clean
docs
py{35,36,37,38,39}-{asyncio,uvloop}
pypy3-asyncio
coverage
[testenv]
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage.{envname}}
PYTHONUNBUFFERED = {env:PYTHONUNBUFFERED:yes}
PYTHONWARNINGS = {env:PYTHONWARNINGS:once::DeprecationWarning}
passenv = *
deps =
pytest>=5,<6
pytest-asyncio>=0.12,<1
pytest-cov>=2.9,<3
coverage>=5.1,<6
hypothesis>=4.57,<5
# required by aiosmtpd, but not pinned
atpublic>=1.0,<2.0
aiosmtpd==1.2.0
uvloop: uvloop>=0.13,<0.15
commands =
asyncio: python -m pytest --basetemp="{envtmpdir}" --cov --cov-report= --cov-config=tox.ini --junitxml=test-results/{envname}/results.xml --event-loop=asyncio --bind-addr={env:AIOSMTPLIB_TEST_BIND_ADDR:localhost} --hypothesis-profile {env:HYPOTHESIS_PROFILE:dev} {posargs:--tb=short}
uvloop: python -m pytest --basetemp="{envtmpdir}" --cov --cov-report= --cov-config=tox.ini --junitxml=test-results/{envname}/results.xml --event-loop=uvloop --bind-addr={env:AIOSMTPLIB_TEST_BIND_ADDR:localhost} --hypothesis-profile {env:HYPOTHESIS_PROFILE:dev} {posargs:--tb=short}
depends =
py{35, 36,37,38,39,310}-{asyncio,uvloop}: clean
pypy3-asyncio: clean
coverage: py35-ayncio, py36-asyncio, py37-asyncio, py38-asyncio, py39-asyncio, py35-uvloop, py36-uvloop, py37-uvloop, py38-uvloop, py39-uvloop, pypy3-asyncio
[testenv:clean]
deps = coverage>=5,<6
skip_install = true
setenv =
COVERAGE_FILE = .coverage
commands =
coverage combine
coverage erase
[testenv:docs]
basepython = python3.8
deps =
{[testenv]deps}
sphinx>=3,<4
sphinx_autodoc_typehints>=1.7,<2
changedir = docs
commands =
sphinx-build {posargs:-nWT} -b doctest -d {envtmpdir}/doctrees . {envtmpdir}/html
sphinx-build {posargs:-nWT} -b dummy -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:lint]
deps =
pre-commit
basepython = python3.8
skip_install = true
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:coverage]
deps = coverage>=5,<6
skip_install = true
setenv =
COVERAGE_FILE = .coverage
commands =
coverage combine
coverage xml
coverage html
coverage report --fail-under=90
[testenv:py35-asyncio]
deps =
{[testenv]deps}
typing-extensions
[testenv:py35-uvloop]
deps =
{[testenv]deps}
typing-extensions
[flake8]
min_python_version = 3.5.2
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E203,E501,W503
exclude = .tox,.git,docs
[isort]
line_length = 88
lines_after_imports = 2
multi_line_output = 3
default_section = THIRDPARTY
known_first_party = aiosmtplib
include_trailing_comma = true
[coverage:run]
source = aiosmtplib
branch = true
parallel = true
[coverage:report]
show_missing = true
exclude_lines =
pass
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
[bandit]
exclude = tests