Skip to content

Commit 1543001

Browse files
committed
fix load dist
1 parent 7e7783c commit 1543001

3 files changed

Lines changed: 2 additions & 20 deletions

File tree

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
run: uv sync --group ci --group tests
3838

3939
- name: Unit tests
40-
run: uv run pytest tests/ -n auto --dist loadgroup
40+
run: uv run pytest tests/ -n auto --dist loadfile

.github/workflows/windows-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
run: uv sync --group ci
3232

3333
- name: Unit tests
34-
run: uv run pytest tests/ -n auto
34+
run: uv run pytest tests/ -n auto --dist loadfile

tests/conftest.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,6 @@
44

55
from codeflash.languages import reset_current_language
66

7-
# Test modules that modify files in code_to_optimize/ must run in the same xdist worker
8-
# to avoid race conditions when running tests in parallel
9-
SHARED_FILE_TEST_MODULES = {
10-
"test_comparator",
11-
"test_instrumentation_run_results_aiservice",
12-
"test_instrument_all_and_run",
13-
"test_async_run_and_parse_tests",
14-
"test_instrument_tests",
15-
}
16-
17-
18-
def pytest_collection_modifyitems(items):
19-
"""Mark tests that modify shared files to run in the same xdist worker."""
20-
for item in items:
21-
module_name = item.module.__name__.split(".")[-1]
22-
if module_name in SHARED_FILE_TEST_MODULES:
23-
item.add_marker(pytest.mark.xdist_group("code_to_optimize_files"))
24-
257

268
@pytest.fixture(autouse=True)
279
def set_python_language():

0 commit comments

Comments
 (0)