Some checks are pending
Checks / Spelling (push) Waiting to run
Checks / Python Linters (push) Waiting to run
Checks / Shell Linters (push) Waiting to run
Checks / 📦 Packit config lint (push) Waiting to run
Checks / 🔍 Check for valid snapshot urls (push) Waiting to run
Checks / 🔍 Check JSON files for formatting consistency (push) Waiting to run
Generate / Documentation (push) Waiting to run
Generate / Test Data (push) Waiting to run
Tests / Unittest (push) Waiting to run
Tests / Assembler test (legacy) (push) Waiting to run
Tests / Smoke run: unittest as normal user on default runner (push) Waiting to run
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test script for osbuild 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 osbuild modules"""
|
|
try:
|
|
print("Testing osbuild module imports...")
|
|
|
|
# Test importing the main module
|
|
import osbuild
|
|
print("✓ osbuild module imported successfully")
|
|
|
|
# Test importing submodules
|
|
import osbuild.pipeline
|
|
print("✓ osbuild.pipeline imported successfully")
|
|
|
|
import osbuild.meta
|
|
print("✓ osbuild.meta imported successfully")
|
|
|
|
import osbuild.util
|
|
print("✓ osbuild.util 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)
|