Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/continue-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
name: Run tests
command: |
mkdir -p test-results
uv run pytest tests/ -v --junitxml=test-results/results.xml
uv run pytest tests/ -v -n auto --junitxml=test-results/results.xml
- store_test_results:
path: test-results
noop-job:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ dev = [
"pre-commit",
"pytest-repeat>=0.9.4",
"taskipy",
"pytest-forked>=1.6.0",
"pytest-xdist>=3.8.0",
]

examples = [
Expand Down
9 changes: 9 additions & 0 deletions tests/v2/backends/simp_driver/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""Tests for simp_driver/http.py (SimpHttpDriver)."""

import multiprocessing
import os
import time

import pytest
Expand All @@ -23,6 +24,14 @@
from mplang.v2.dialects import simp
from mplang.v2.edsl.context import pop_context, push_context

# Skip when running with pytest-xdist (parallel workers)
# These tests use multiprocessing which conflicts with xdist's process model
_is_xdist_worker = os.environ.get("PYTEST_XDIST_WORKER") is not None
pytestmark = pytest.mark.skipif(
_is_xdist_worker,
reason="HTTP tests use fork() which conflicts with pytest-xdist workers",
)


def run_worker(rank: int, world_size: int, port: int, endpoints: list[str]) -> None:
"""Run a single worker server."""
Expand Down
9 changes: 9 additions & 0 deletions tests/v2/backends/simp_worker/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import logging
import multiprocessing
import os
import time

import httpx
Expand All @@ -30,6 +31,14 @@
from mplang.v2.dialects import simp, tensor
from mplang.v2.edsl.context import pop_context, push_context

# Skip when running with pytest-xdist (parallel workers)
# These tests use multiprocessing which conflicts with xdist's process model
_is_xdist_worker = os.environ.get("PYTEST_XDIST_WORKER") is not None
pytestmark = pytest.mark.skipif(
_is_xdist_worker,
reason="HTTP tests use multiprocessing which can conflict with pytest-xdist workers",
)

logging.basicConfig(level=logging.DEBUG)


Expand Down
39 changes: 39 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading