Skip to content

Commit 4422b2d

Browse files
Fix test failure with pytest 7.1 (#112)
1 parent 6e2a7c7 commit 4422b2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_calculate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ def test_calculate_residuals(models): # pylint: disable=W0621
202202
expected_residuals, _, _) = model
203203
residual_dfs = calculate_residuals(
204204
measurement_df, simulation_df, observable_df, parameter_df)
205-
assert set(residual_dfs[0][RESIDUAL]) == pytest.approx(
206-
expected_residuals)
205+
assert sorted(residual_dfs[0][RESIDUAL]) == \
206+
pytest.approx(sorted(expected_residuals))
207207

208208

209209
def test_calculate_non_normalized_residuals(models): # pylint: disable=W0621
@@ -215,8 +215,8 @@ def test_calculate_non_normalized_residuals(models): # pylint: disable=W0621
215215
residual_dfs = calculate_residuals(
216216
measurement_df, simulation_df, observable_df, parameter_df,
217217
normalize=False)
218-
assert set(residual_dfs[0][RESIDUAL]) == pytest.approx(
219-
expected_residuals_nonorm)
218+
assert sorted(residual_dfs[0][RESIDUAL]) == \
219+
pytest.approx(sorted(expected_residuals_nonorm))
220220

221221

222222
def test_calculate_chi2(models): # pylint: disable=W0621

0 commit comments

Comments
 (0)