File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 44
55from 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 )
279def set_python_language ():
You can’t perform that action at this time.
0 commit comments