Skip to content

Commit a926160

Browse files
committed
tests: Disable pytest-timeout for Pyodide (no signal.setitimer)
Pyodide runs in a WebAssembly sandbox without POSIX signals, so `signal.setitimer` is not available. This causes pytest-timeout to crash with `AttributeError: module 'signal' has no attribute 'setitimer'` when timeout > 0. Override the test-command for Pyodide to keep timeout=0 (disabled).
1 parent 1526a85 commit a926160

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ PYBIND11_FINDPYTHON = true
2828
[tool.cibuildwheel]
2929
test-sources = ["tests", "pyproject.toml"]
3030
test-command = "python -m pytest -v -o timeout=120 -p no:cacheprovider tests"
31+
# Pyodide doesn't have signal.setitimer, so pytest-timeout can't work with timeout > 0
32+
pyodide.test-command = "python -m pytest -v -o timeout=0 -p no:cacheprovider tests"
3133
environment.PIP_ONLY_BINARY = "numpy"
3234
environment.PIP_PREFER_BINARY = "1"
3335

0 commit comments

Comments
 (0)