mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
tests: run in parallel with pytest-xdist
pytest now runs with -n auto; pass -n0 to run tests one by one. The pty harness starts pqcli through subprocess instead of pty.fork(), which is unsafe in the threaded xdist workers, and the child claims the pty as its controlling terminal so ^C still raises SIGINT.
This commit is contained in:
3 files changed
+66
-17
No files matched your search
+11
-1
@@ -37,7 +37,13 @@ requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = ["prek>=0.2", "pyte>=0.8", "pytest>=8.0", "ty>=0.0.89"]
|
||||
dev = [
|
||||
"prek>=0.2",
|
||||
"pyte>=0.8",
|
||||
"pytest>=8.0",
|
||||
"pytest-xdist>=3.0",
|
||||
"ty>=0.0.89",
|
||||
]
|
||||
|
||||
[tool.ty.src]
|
||||
# Only the package and its tests; agent worktrees under .claude/ would
|
||||
@@ -53,6 +59,10 @@ select = ["E", "F", "W", "I", "UP"]
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["pqcli"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
# Run tests in parallel; pass -n0 to run them one by one.
|
||||
addopts = "-n auto"
|
||||
|
||||
[tool.coverage.run]
|
||||
# Also measure the pqcli processes the tests start, such as the curses
|
||||
# UI driven through a pseudo-terminal.
|
||||
|
||||
Reference in new issue
Block a user