forked from pyppeteer/pyppeteer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
71 lines (62 loc) · 1.72 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
[tox]
envlist = py3{6,7,8},flake8,mypy
minversion = 3.4.0
isolated_build = True
[testenv]
passenv:
PYTEST_ADDOPTS
CI*
whitelist_external =
poetry
deps =
py3{6,7,8},mypy: poetry
skip_install = true
commands_pre:
; mypy config doesn't play well when checking a dir, have to install the package and check it instead
py3{6,7,8},mypy: poetry install -vv
py3{6,7,8}: poetry run pyppeteer-install
commands =
py3{6,7,8}: poetry run pytest {posargs}
[testenv:flake8]
deps =
flake8
black
commands =
flake8 ./
black --check -S
[testenv:mypy]
passenv = MYPY_JUNIT_XML_PATH
deps = mypy
whitelist_externals: poetry
commands = mypy pyppeteer --config-file ./tox.ini
[flake8]
max-line-length = 120
exclude = docs,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,out
max-complexity = 7
[pydocstyle]
ignore = D105,D107,D203,D213,D402,D404
match_dir = (?!(tmp|docs|ja_docs|tests|\.)).*
[pytest]
; default number of workers for testing
; to change parallelism setting, export the PYTEST_ADDOPTS env variable
; (no need to change the next line, it's overridden by PYTEST_ADDOPTS)
addopts = -n 6
minversion = 5.0.0
; nicely formatted junit output for CI builds (must be enabled with flag: --junitxml=PATH)
junit_suite_name: pyppeteer tests
junit_log_passing_tests: True
junit_family = xunit2
;mypy config
;only mypy will be paying attention to this
;(hence the different env var interpolation format)
[mypy]
; this line is currently useless until this PR lands: https://github.com/python/mypy/pull/8479
junit_xml = $MYPY_JUNIT_XML_PATH
strict_optional = true
disallow_untyped_defs = true
disallow_untyped_calls = true
follow_imports = silent
ignore_missing_imports = true
mypy_path = out
[mypy-pyppeteer.tests.*,pyppeteer.docs.*]
ignore_errors = true