You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ff89da
Browse filesBrowse the repository at this point in the historyBrowse files
test: repair stale baseline to fully green (232 passed) + add CI
The long-standing "~19-22 environmental baseline failures" were a
misdiagnosis: all were stale tests that drifted from the code after the
v1.5.11/v1.6.0 refactors. Fixed so the suite is 232 passed / 0 failed.
- solar_surplus grid-import/stability tests mocked time.time /
solar_surplus.datetime, but the code uses time.monotonic() /
dt_util.now() -> the mocks were no-ops. Patch the real symbols.
- shared mock_charger_controller fixture returned bool where the real
ChargerController returns OperationResult (callers read result.success).
Add _ok_result() in conftest. Also fix a stale _session_state assertion
(control loss sets "completed_today" since v1.5.11) and a wall-clock
grid-import trigger set under a patched clock in night_smart_charge.
- charger_controller rate-limit test used naive datetime.now() against the
controller's aware dt_util.now() -> TypeError. Use dt_util.now().
- entity_platforms had stale hardcoded counts and a PV-only fixture that
then looked up battery-only entities; _mock_entry now maps CONF_SOC_HOME
and counts are with-battery (number 34, switch 21, time 4, sensor 9).
Pin pytest-homeassistant-custom-component==0.12.49 (was >=) so CI matches
the verified HA 2023.1.7, and add .github/workflows/tests.yml running
pytest on push/PR so the baseline can't silently rot again.
No integration code change; version stays 2.7.2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments