debian-koji/test_koji.py
2025-08-26 11:48:31 -07:00

40 lines
1,008 B
Python

#!/usr/bin/env python3
"""
Test script for koji module functionality
"""
import sys
import os
# Add the current directory to Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
def test_imports():
"""Test importing koji modules"""
try:
print("Testing koji module imports...")
# Test importing the main module
import koji
print("✓ koji module imported successfully")
# Test importing submodules
import koji.util
print("✓ koji.util imported successfully")
import koji.tasks
print("✓ koji.tasks imported successfully")
print("All imports successful!")
return True
except ImportError as e:
print(f"✗ Import failed: {e}")
return False
except Exception as e:
print(f"✗ Unexpected error: {e}")
return False
if __name__ == "__main__":
success = test_imports()
sys.exit(0 if success else 1)