Create a Python test process without starting it
(
enable_stack_trace: bool, run_slow: bool = False, verbose: bool = False
)
| 624 | |
| 625 | |
| 626 | def create_python_test_process( |
| 627 | enable_stack_trace: bool, run_slow: bool = False, verbose: bool = False |
| 628 | ) -> RunningProcess: |
| 629 | """Create a Python test process without starting it""" |
| 630 | # Use list format for better environment handling |
| 631 | cmd = [ |
| 632 | "uv", |
| 633 | "run", |
| 634 | "pytest", |
| 635 | "--tb=short", # Shorter traceback format |
| 636 | "ci/tests", # Test directory |
| 637 | ] |
| 638 | |
| 639 | # Add verbose flags only if requested |
| 640 | if verbose: |
| 641 | cmd.extend(["-s", "-v"]) # Don't capture stdout/stderr, verbose output |
| 642 | |
| 643 | # Always show test durations |
| 644 | cmd.append("--durations=0") |
| 645 | |
| 646 | # If running slow tests, add --runslow flag (handled by conftest.py) |
| 647 | if run_slow: |
| 648 | cmd.append("--runslow") |
| 649 | |
| 650 | cmd_str = subprocess.list2cmdline(cmd) |
| 651 | |
| 652 | return RunningProcess( |
| 653 | cmd_str, |
| 654 | auto_run=False, # Don't auto-start - will be started in parallel later |
| 655 | timeout=_TIMEOUT, # 2 minute timeout for Python tests |
| 656 | output_formatter=TimestampFormatter(), |
| 657 | ) |
| 658 | |
| 659 | |
| 660 | def create_integration_test_process( |
no test coverage detected