diff --git a/pybamm/experiments/experiment.py b/pybamm/experiments/experiment.py index 53069115c8..f0fcbb60d3 100644 --- a/pybamm/experiments/experiment.py +++ b/pybamm/experiments/experiment.py @@ -162,7 +162,7 @@ def read_operating_conditions(self, operating_conditions, drive_cycles): """ converted_operating_conditions = [] events = [] - for idx, cond in enumerate(operating_conditions): + for cond in operating_conditions: next_op, next_event = self.read_string(cond, drive_cycles) converted_operating_conditions.append(next_op) events.append(next_event) diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py index f2dd194eb8..0e5960f8a1 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py @@ -191,6 +191,11 @@ def test_well_posed_power(self): model = pybamm.lithium_ion.SPM(options) model.check_well_posedness() + def test_well_posed_cccv(self): + options = {"operating mode": "CCCV"} + model = pybamm.lithium_ion.SPM(options) + model.check_well_posedness() + def test_well_posed_function(self): def external_circuit_function(variables): I = variables["Current [A]"]