chore: Pre-cleanup commit - save current state before major reorganization
This commit is contained in:
84
ml/python/test_module_import.py
Executable file
84
ml/python/test_module_import.py
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test imports for foxhunt_runpod module.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add module to path
|
||||
sys.path.insert(0, str(Path(__file__).parent))
|
||||
|
||||
def test_imports():
|
||||
"""Test all module imports."""
|
||||
print("Testing foxhunt_runpod module imports...\n")
|
||||
|
||||
# Test 1: Main module
|
||||
print("1. Importing main module...")
|
||||
try:
|
||||
import foxhunt_runpod
|
||||
print(f" ✓ Version: {foxhunt_runpod.__version__}")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
# Test 2: RunPodClient
|
||||
print("\n2. Importing RunPodClient...")
|
||||
try:
|
||||
from foxhunt_runpod import RunPodClient
|
||||
print(" ✓ RunPodClient imported")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
# Test 3: PodMonitor
|
||||
print("\n3. Importing PodMonitor...")
|
||||
try:
|
||||
from foxhunt_runpod import PodMonitor
|
||||
print(" ✓ PodMonitor imported")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
# Test 4: S3Client
|
||||
print("\n4. Importing S3Client...")
|
||||
try:
|
||||
from foxhunt_runpod import S3Client
|
||||
print(" ✓ S3Client imported")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
# Test 5: Config
|
||||
print("\n5. Importing RunPodConfig...")
|
||||
try:
|
||||
from foxhunt_runpod import RunPodConfig
|
||||
print(" ✓ RunPodConfig imported")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
# Test 6: Errors
|
||||
print("\n6. Importing exceptions...")
|
||||
try:
|
||||
from foxhunt_runpod import (
|
||||
RunPodError,
|
||||
PodDeploymentError,
|
||||
PodNotFoundError,
|
||||
S3Error,
|
||||
ConfigurationError,
|
||||
)
|
||||
print(" ✓ All exceptions imported")
|
||||
except Exception as e:
|
||||
print(f" ✗ Failed: {e}")
|
||||
return False
|
||||
|
||||
print("\n" + "=" * 70)
|
||||
print("✅ All imports successful!")
|
||||
print("=" * 70)
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
success = test_imports()
|
||||
sys.exit(0 if success else 1)
|
||||
Reference in New Issue
Block a user