forked from D4Vinci/Scrapling
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
29 lines (26 loc) · 1.14 KB
/
tox.ini
File metadata and controls
29 lines (26 loc) · 1.14 KB
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
# Tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = pre-commit,py{310,311,312,313}
[testenv]
usedevelop = True
changedir = tests
deps =
playwright==1.56.0
patchright==1.56.0
-r{toxinidir}/tests/requirements.txt
extras = ai,shell
commands =
# Run browser tests without parallelization (avoid browser conflicts)
pytest --cov=scrapling --cov-report=xml -k "DynamicFetcher or StealthyFetcher" --verbose
# Run asyncio tests without parallelization (avoid GitHub CI nested loop issues)
pytest --cov=scrapling --cov-report=xml -m "asyncio" -k "not (DynamicFetcher or StealthyFetcher)" --verbose --cov-append
# Run everything else with parallelization (for speed)
pytest --cov=scrapling --cov-report=xml -m "not asyncio" -k "not (DynamicFetcher or StealthyFetcher)" -n auto --cov-append
[testenv:pre-commit]
basepython = python3
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true