Check if a Python test file exists for the given test name
(test_name: str)
| 11 | |
| 12 | |
| 13 | def _python_test_exists(test_name: str) -> bool: |
| 14 | """Check if a Python test file exists for the given test name""" |
| 15 | # Check for the test file in ci/tests directory |
| 16 | tests_dir = Path("ci/tests") |
| 17 | |
| 18 | # Try various naming patterns for Python tests |
| 19 | possible_names = [ |
| 20 | f"test_{test_name}.py", |
| 21 | f"{test_name}.py", |
| 22 | ] |
| 23 | |
| 24 | for name in possible_names: |
| 25 | test_file = tests_dir / name |
| 26 | if test_file.exists(): |
| 27 | return True |
| 28 | |
| 29 | return False |
| 30 | |
| 31 | |
| 32 | def parse_args(args: Optional[list[str]] = None) -> TestArgs: |