Skip to content

Commit a961c87

Browse files
shaypal5Copilot
andauthored
Update scripts/test-local.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 948709d commit a961c87

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/test-local.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,14 @@ main() {
540540
# Build pytest command
541541
PYTEST_CMD="pytest"
542542
# and the specific pytest command for running serial pickle tests
543-
SERIAL_PYTEST_CMD="pytest -m seriallocal -n0"
543+
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
544551

545552
# Add test files if specified
546553
if [ -n "$TEST_FILES" ]; then

0 commit comments

Comments
 (0)