fix: Clean up and standardize test code formatting
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.
This commit is contained in:
GSRN
2025-09-15 21:12:15 +02:00
parent 64d4e405c5
commit 8c37bff103
6 changed files with 82 additions and 114 deletions

View File

@@ -2,19 +2,19 @@
"""
Test runner script for LabFusion Service Adapters
"""
import os
import subprocess
import sys
import os
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",
@@ -25,14 +25,14 @@ def run_tests():
"--cov-report=html",
"--cov-report=xml",
"--junitxml=tests/reports/junit.xml",
"--tb=short"
"--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: