We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 948709d commit a961c87Copy full SHA for a961c87
1 file changed
scripts/test-local.sh
@@ -540,7 +540,14 @@ main() {
540
# Build pytest command
541
PYTEST_CMD="pytest"
542
# and the specific pytest command for running serial pickle tests
543
- SERIAL_PYTEST_CMD="pytest -m seriallocal -n0"
+ SERIAL_PYTEST_CMD="pytest -m seriallocal"
544
+ # Only add -n0 if pytest-xdist is available; otherwise, plain pytest is already serial
545
+ if python - << 'EOF' >/dev/null 2>&1
546
+import xdist # noqa: F401
547
+EOF
548
+ then
549
+ SERIAL_PYTEST_CMD="$SERIAL_PYTEST_CMD -n0"
550
+ fi
551
552
# Add test files if specified
553
if [ -n "$TEST_FILES" ]; then
0 commit comments