Skip to content

Commit 6ae65c4

Browse files
committed
Added 60 seconds timeout per test to prevent indefinite loops (reference: https://pypi.org/project/pytest-timeout/).
1 parent 91466f9 commit 6ae65c4

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Generate coverage report
3131
# The list of "--ignore=..." arguments should be identical to the exclusion list in tox.ini, though without comments:
3232
run: >
33-
uv run pytest --numprocesses=3 --cov=./ --cov-report=xml -vv -rA
33+
uv run pytest --timeout=60 --numprocesses=3 --cov=./ --cov-report=xml -vv -rA
3434
--ignore=test/browser/input/select_1_test.py
3535
--ignore=test/browser/input/select_headless_exception_test.py
3636
--ignore=test/browser/viewport/get/height_non_headless_1_test.py

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ dev = [
4646
"pre-commit==4.5.1",
4747
"pytest==9.1.1",
4848
"pytest-cov==7.1.0",
49+
"pytest-timeout==2.4.0",
4950
"pytest-xdist==3.8.0",
5051
"ruff==0.15.20",
5152
"tox==4.58.0",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setenv =
1515
dependency_groups =
1616
dev
1717
commands =
18-
pytest --numprocesses {env:PYTEST_XDIST_WORKERS:3} --basetemp={envtmpdir} --cov --cov-append --cov-report=term-missing -vv -rA \
18+
pytest --timeout=60 --numprocesses {env:PYTEST_XDIST_WORKERS:3} --basetemp={envtmpdir} --cov --cov-append --cov-report=term-missing -vv -rA \
1919
# Ignore tests that require a non-headless browser and are only supported on a local machine:
2020
--ignore=test/browser/input/select_1_test.py \
2121
--ignore=test/browser/input/select_headless_exception_test.py \

0 commit comments

Comments
 (0)