Skip to content

Commit fca4dea

Browse files
committed
#2793 update test
1 parent 1b7959e commit fca4dea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
## Bug fixes
1212

13+
- Fixed a bug where variable bounds could not contain `InputParameters` ([#2795](https://github.com/pybamm-team/PyBaMM/pull/2795))
1314
- Improved `model.latexify()` to have a cleaner and more readable output ([#2764](https://github.com/pybamm-team/PyBaMM/pull/2764))
1415
- Fixed electrolyte conservation in the case of concentration-dependent transference number ([#2758](https://github.com/pybamm-team/PyBaMM/pull/2758))
1516
- Fixed `plot_voltage_components` so that the sum of overpotentials is now equal to the voltage ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))

tests/unit/test_discretisations/test_discretisation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ def test_discretise_slicing(self):
144144

145145
# bounds with an InputParameter
146146
a = pybamm.InputParameter("a")
147-
v = pybamm.Variable("v", domain=whole_cell, bounds=(0, a))
147+
b = pybamm.InputParameter("b")
148+
v = pybamm.Variable("v", domain=whole_cell, bounds=(a, b))
148149
disc.set_variable_slices([v])
149-
np.testing.assert_array_equal(disc.bounds[0], [0] * 100)
150+
np.testing.assert_array_equal(disc.bounds[0], [-np.inf] * 100)
150151
np.testing.assert_array_equal(disc.bounds[1], [np.inf] * 100)
151152

152153
def test_process_symbol_base(self):

0 commit comments

Comments
 (0)