Some checks failed
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 20s
Docker Build and Push / build-and-push (push) Failing after 37s
Integration Tests / integration-tests (push) Failing after 32s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 15s
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 1m18s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 22s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 23s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 21s
LabFusion CI/CD Pipeline / frontend (push) Failing after 2m0s
Service Adapters (Python FastAPI) / build (push) Has been skipped
LabFusion CI/CD Pipeline / api-docs (push) Successful in 1m53s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
### Summary of Changes - Removed unnecessary blank lines and standardized import statements across test files. - Ensured consistent use of quotes in patch decorators and improved formatting of test data structures. - Enhanced readability and maintainability of test code by applying clean code principles. ### Expected Results - Improved clarity and consistency in test code, facilitating easier understanding and future modifications.
45 lines
927 B
Python
45 lines
927 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test runner script for LabFusion Service Adapters
|
|
"""
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def run_tests():
|
|
"""Run the test suite"""
|
|
print("🧪 Running LabFusion Service Adapters Tests")
|
|
print("=" * 50)
|
|
|
|
# Ensure test reports directory exists
|
|
os.makedirs("tests/reports", exist_ok=True)
|
|
|
|
# Run pytest with coverage
|
|
cmd = [
|
|
"pytest",
|
|
"tests/",
|
|
"-v",
|
|
"--cov=.",
|
|
"--cov-report=term-missing",
|
|
"--cov-report=html",
|
|
"--cov-report=xml",
|
|
"--junitxml=tests/reports/junit.xml",
|
|
"--tb=short",
|
|
]
|
|
|
|
print(f"Running: {' '.join(cmd)}")
|
|
print()
|
|
|
|
result = subprocess.run(cmd, cwd=os.path.dirname(__file__))
|
|
|
|
if result.returncode == 0:
|
|
print("\n✅ All tests passed!")
|
|
else:
|
|
print("\n❌ Some tests failed!")
|
|
sys.exit(1)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run_tests()
|