1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Allow more rounding errors in the tests with scipy 1.14
Bug: https://github.com/hoechenberger/questplus/issues/55
Bug-Debian: https://bugs.debian.org/1079788
Author: Graham Inggs <ginggs@debian.org>
Last-Update: 2024-12-19
--- a/questplus/tests/test_qp.py
+++ b/questplus/tests/test_qp.py
@@ -435,11 +435,11 @@
next_stim_1 = qp.next_stim['physical_magnitude_stim_1']
next_stim_2 = qp.next_stim['physical_magnitude_stim_2']
- if trial_idx in (6, 20):
+ if trial_idx in (6, 20, 21):
# Rounding errors make the algorithm behave differently on different platforms.
if (
- expected_stim_1 == next_stim_2 and
- expected_stim_2 == next_stim_1
+ np.isclose(expected_stim_1, next_stim_2) and
+ np.isclose(expected_stim_2, next_stim_1)
):
expected_stim_1, expected_stim_2 = expected_stim_2, expected_stim_1
response = 'First' if response == 'Second' else 'Second'
|