mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
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:
17
tests/test_stuff_thing.py
Normal file
17
tests/test_stuff_thing.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Tests for python/stuff/thing.py."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from python.stuff.thing import caculat_batry_specs
|
||||
|
||||
|
||||
def test_caculat_batry_specs() -> None:
|
||||
"""Test battery specs calculation."""
|
||||
capacity, voltage = caculat_batry_specs(
|
||||
cell_amp_hour=300,
|
||||
cell_voltage=3.2,
|
||||
cells_per_pack=8,
|
||||
packs=2,
|
||||
)
|
||||
assert voltage == 3.2 * 8
|
||||
assert capacity == voltage * 300 * 2
|
||||
Reference in New Issue
Block a user