Add market data handling, battery state updates, and unit tests

This commit is contained in:
2026-09-22 15:43:30 +01:00
parent 34a7aeaf03
commit 4e37339534
5 changed files with 139 additions and 2 deletions
+6
View File
@@ -1,4 +1,6 @@
from batterymodel import BatteryModel
from batterymodel.models.battery import BatteryState
def test_battery_stats():
assert BatteryModel()._max_charge_rate == 2000000 # Watts
@@ -10,3 +12,7 @@ def test_battery_stats():
assert BatteryModel()._lifetime_cycles == 50000
assert BatteryModel()._storage_volume_degradation_rate == 0.001 # %/cycle
assert BatteryModel()._fixed_operational_costs == 50000 # £/year
def test_battery_update():
battery = BatteryModel()
assert battery._battery_state == BatteryState.IDLE