Main entry point for test discovery.
()
| 64 | |
| 65 | |
| 66 | def main() -> None: |
| 67 | """Main entry point for test discovery.""" |
| 68 | if len(sys.argv) != 2: |
| 69 | print("Usage: discover_tests.py <tests_directory>", file=sys.stderr) |
| 70 | sys.exit(1) |
| 71 | |
| 72 | tests_dir = Path(sys.argv[1]).resolve() |
| 73 | |
| 74 | if not tests_dir.exists(): |
| 75 | print(f"Error: Tests directory not found: {tests_dir}", file=sys.stderr) |
| 76 | sys.exit(1) |
| 77 | |
| 78 | from test_config import EXCLUDED_TEST_DIRS, EXCLUDED_TEST_FILES |
| 79 | |
| 80 | test_files = discover_test_files(tests_dir, EXCLUDED_TEST_FILES, EXCLUDED_TEST_DIRS) |
| 81 | |
| 82 | # Output one file path per line |
| 83 | for test_file in test_files: |
| 84 | print(test_file) |
| 85 | |
| 86 | |
| 87 | if __name__ == "__main__": |
no test coverage detected