citylearn.tests.test_battery module

class citylearn.tests.test_battery.DataSet[source]

Bases: object

get_battery_sizing_data()[source]
class citylearn.tests.test_battery.Environment(**kwargs)[source]

Bases: object

get_metadata()[source]
reset()[source]
class citylearn.tests.test_battery.TestBattery(methodName='runTest')[source]

Bases: TestCase

Unit tests for the Battery class

setUp()[source]

Set up test fixtures before each test

tearDown()[source]

Clean up after each test

test_as_dict()[source]

Test the as_dict method for rendering

test_autosize(mock_dataset)[source]

Test the autosize method

test_capacity_limit()[source]

Test that the battery respects the capacity limit when charging

test_charge_negative_energy()[source]

Test the charge method with negative energy (discharging)

test_charge_positive_energy()[source]

Test the charge method with positive energy (charging)

test_degrade()[source]

Test the battery degradation calculation

test_depth_of_discharge_limit()[source]

Test that the battery respects the depth of discharge limit when discharging

test_force_set_soc()[source]

Test the force_set_soc method

test_get_current_efficiency()[source]

Test the efficiency calculation based on power level

test_get_max_input_power()[source]

Test the get_max_input_power method at different SOC levels

test_get_metadata()[source]

Test the get_metadata method

test_initialization()[source]

Test battery initialization with various parameters

test_property_getters()[source]

Test property getters return expected values

test_property_setters()[source]

Test property setters update values correctly

test_reset()[source]

Test the reset method