cf-python icon indicating copy to clipboard operation
cf-python copied to clipboard

Address flakiness of `test_curl_xy`

Open sadielbartholomew opened this issue 3 years ago • 0 comments

test_curl_xy from the test_Maths module is proving itself to be a flaky test, particularly when run within the CI jobs rather than locally (at least as far as I have observed locally, where it always passes):

FAIL: test_curl_xy (test_Maths.MathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/tmp/test_cf-python/cf/test/test_Maths.py", line 146, in test_curl_xy
    self.assertTrue((c.data == c0.data).all())
AssertionError: False is not true

We should adapt it so that the outcome is reliably deterministic. It is probably a simple-enough case of testing floating point equality to a tolerance rather than strict equality as present.

sadielbartholomew avatar Mar 10 '22 01:03 sadielbartholomew