()
| 126 | print("❌ requests not available - install with: pip install requests") |
| 127 | |
| 128 | def main(): |
| 129 | parser = argparse.ArgumentParser(description="Run DeepWiki tests") |
| 130 | parser.add_argument("--unit", action="store_true", help="Run only unit tests") |
| 131 | parser.add_argument("--integration", action="store_true", help="Run only integration tests") |
| 132 | parser.add_argument("--api", action="store_true", help="Run only API tests") |
| 133 | parser.add_argument("--check-env", action="store_true", help="Only check environment setup") |
| 134 | parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output") |
| 135 | |
| 136 | args = parser.parse_args() |
| 137 | |
| 138 | # Check environment first |
| 139 | check_environment() |
| 140 | |
| 141 | if args.check_env: |
| 142 | return |
| 143 | |
| 144 | # Determine which tests to run |
| 145 | test_dirs = [] |
| 146 | if args.unit: |
| 147 | test_dirs.append("unit") |
| 148 | if args.integration: |
| 149 | test_dirs.append("integration") |
| 150 | if args.api: |
| 151 | test_dirs.append("api") |
| 152 | |
| 153 | # If no specific category selected, run all |
| 154 | if not test_dirs: |
| 155 | test_dirs = ["unit", "integration", "api"] |
| 156 | |
| 157 | print(f"\n🚀 Starting test run for: {', '.join(test_dirs)}") |
| 158 | |
| 159 | success = run_tests(test_dirs) |
| 160 | sys.exit(0 if success else 1) |
| 161 | |
| 162 | if __name__ == "__main__": |
| 163 | main() |
no test coverage detected