forked from scrapy-plugins/scrapy-playwright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (63 loc) · 1.7 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 = bandit,black,flake8,typing,pylint,py,py-twisted
[testenv]
deps =
pytest==7.4.0
pytest_cov==4.1.0
pytest_twisted==1.14
psutil==5.9.7
playwright==1.44 # version must match the one installed with npm below
allowlist_externals =
npm
npx
commands =
playwright install
npm install playwright@1.44
npx playwright install chromium
py.test -vv --reactor=asyncio \
--cov-report=term-missing \
--cov-report=xml:coverage-asyncio.xml \
--cov-report=html:coverage-asyncio \
--cov=scrapy_playwright {posargs: scrapy_playwright tests/tests_asyncio}
setenv =
DEBUG=pw:api
[testenv:py]
basepython = python3
[testenv:py-twisted]
basepython = python3
commands =
playwright install
py.test -vv --reactor=asyncio \
--cov-report=term-missing \
--cov-report=xml:coverage-twisted.xml \
--cov-report=html:coverage-twisted \
--cov=scrapy_playwright {posargs: scrapy_playwright tests/tests_twisted}
[testenv:bandit]
deps =
bandit
commands =
bandit -r {posargs: scrapy_playwright setup.py examples}
[testenv:black]
deps =
black==24.4.2
commands =
black --check {posargs: scrapy_playwright setup.py tests examples}
[testenv:flake8]
deps =
flake8==7.0.0
commands =
flake8 --exclude=.git,.tox,venv* {posargs: scrapy_playwright setup.py tests examples}
[testenv:typing]
deps =
mypy==1.10.0
commands =
mypy --show-error-codes --ignore-missing-imports \
--follow-imports=skip {posargs: scrapy_playwright setup.py tests examples}
[testenv:pylint]
deps =
psutil==5.9.7
pylint==3.2.2
pytest==7.4.0
commands =
pip install -e .
pylint {posargs: scrapy_playwright setup.py tests}