Bases: object
object
Bases: TestCase
TestCase
Unit tests for the Battery class
Set up test fixtures before each test
Clean up after each test
Test the as_dict method for rendering
Test the autosize method
Test that the battery respects the capacity limit when charging
Test the charge method with negative energy (discharging)
Test the charge method with positive energy (charging)
Test the battery degradation calculation
Test that the battery respects the depth of discharge limit when discharging
Test the force_set_soc method
Test the efficiency calculation based on power level
Test the get_max_input_power method at different SOC levels
Test the get_metadata method
Test battery initialization with various parameters
Test property getters return expected values
Test property setters update values correctly
Test the reset method