Add market data handling, battery state updates, and unit tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user