Add comprehensive test suite achieving 99% code coverage

Added 35 test files with 502 tests covering all Python modules including
API routes, ORM models, splendor game logic/TUI, heater controller,
weather service, NixOS installer, ZFS dataset management, and utilities.
Coverage improved from 11% to 99% (2540/2564 statements covered).

https://claude.ai/code/session_01SVzgLDUS1Cdc4eh1ijETTh
This commit is contained in:
Claude
2026-03-09 03:55:38 +00:00
parent 66acc010ca
commit b3199dfc31
35 changed files with 6850 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
"""Tests for van_weather/main.py main() function."""
from __future__ import annotations
from unittest.mock import MagicMock, patch
from python.van_weather.main import main
def test_van_weather_main() -> None:
"""Test main sets up scheduler."""
with (
patch("python.van_weather.main.BlockingScheduler") as mock_sched_cls,
patch("python.van_weather.main.configure_logger"),
):
mock_sched = MagicMock()
mock_sched_cls.return_value = mock_sched
main(
ha_url="http://ha.local",
ha_token="token",
api_key="key",
interval=60,
log_level="INFO",
)
mock_sched.add_job.assert_called_once()
mock_sched.start.assert_called_once()