From 012014a20c6b896ad88404a0259547dd8710f8ac Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 21 Jan 2026 11:57:46 -0500 Subject: [PATCH] Add parallel test execution with pytest-xdist The test suite was taking 30 minutes to run sequentially. With 434 tests, parallel execution should significantly reduce CI time. Changes: - Add pytest-xdist to requirements-test.txt - Update Makefile test target to use 'pytest -n auto' - Auto mode automatically uses number of CPU cores available Expected improvements: - Unit tests and model tests can run fully in parallel - Integration tests with isolated databases can run in parallel - Overall test time should reduce to ~5-10 minutes on multi-core CI Note: Crypto RPC tests may still be a bottleneck if they hit shared wallet daemons, but most other tests should parallelize well. --- Makefile | 2 +- requirements-test.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f47e4d..9400dad 100644 --- a/Makefile +++ b/Makefile @@ -175,7 +175,7 @@ activate: # Run the test suite. test: install-source-dev-and-test @echo "Running tests..." - $(VENV_DIR)/bin/py.test + $(VENV_DIR)/bin/py.test -n auto # Run tests with coverage for the full repository. test-coverage: install-source-dev-and-test diff --git a/requirements-test.txt b/requirements-test.txt index 142b5b1..76b59ed 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,7 @@ # testing. pytest pytest-cov +pytest-xdist # Parallel test execution nose mock WebTest