Commit 85543c40 authored by Thomas Vincent's avatar Thomas Vincent

Make all comparison not strict on windows

parent a2a08398
......@@ -106,22 +106,23 @@ def _cmp_fit_h5_results(test_case,
test_case.assertEqual(ref_results, this_results)
if sys.platform == 'win32': # Relax tests on Windows
compare_arrays = np.allclose
else:
compare_arrays = np.array_equal
for result in ref_results:
ref_qx = ref_h5.get_qx_result(entry, process, result)
this_qx = this_h5.get_qx_result(entry, process, result)
if sys.platform == 'win32':
# Relax tests on Windows
test_case.assertTrue(np.allclose(ref_qx, this_qx))
else:
test_case.assertTrue(np.array_equal(ref_qx, this_qx))
test_case.assertTrue(compare_arrays(ref_qx, this_qx))
ref_qy = ref_h5.get_qy_result(entry, process, result)
this_qy = this_h5.get_qy_result(entry, process, result)
test_case.assertTrue(np.array_equal(ref_qy, this_qy))
test_case.assertTrue(compare_arrays(ref_qy, this_qy))
ref_qz = ref_h5.get_qz_result(entry, process, result)
this_qz = this_h5.get_qz_result(entry, process, result)
test_case.assertTrue(np.array_equal(ref_qz, this_qz))
test_case.assertTrue(compare_arrays(ref_qz, this_qz))
class TestPeakFitter(ParametricTestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment