forked from fustom/ariston-remotethermo-home-assistant-v3
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.py
More file actions
executable file
·50 lines (31 loc) · 973 Bytes
/
run_tests.py
File metadata and controls
executable file
·50 lines (31 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
"""Test runner script for Ariston integration."""
import sys
import subprocess
from pathlib import Path
def main():
"""Run tests for the Ariston integration."""
project_root = Path(__file__).parent
# Install test requirements
print("Installing test requirements...")
subprocess.run([
sys.executable, "-m", "pip", "install", "-r", "requirements-test.txt"
], cwd=project_root, check=True)
# Run tests
print("Running tests...")
result = subprocess.run([
sys.executable, "-m", "pytest",
"tests/",
"-v",
"--tb=short",
"--cov=custom_components.ariston",
"--cov-report=html",
"--cov-report=term-missing"
], cwd=project_root)
if result.returncode == 0:
print("✅ All tests passed!")
else:
print("❌ Some tests failed!")
sys.exit(result.returncode)
if __name__ == "__main__":
main()