CI-WATER / gsshapy

An SQLAlchemy ORM for GSSHA model files and a toolkit to convert gridded input into GSSHA input.
BSD 3-Clause "New" or "Revised" License
7 stars 9 forks source link

Many Tests Fail due to Small Tolerances on Almost Equal Comparisons #32

Open swainn opened 5 years ago

swainn commented 5 years ago

I've marked many of the tests with xfail (expected fail) b/c most of them use almost equal comparisons on files with very small tolerances. As a result, the tests fail on many systems due to the natural variance from system to system.

When marked as xfail, these tests will still run, but won't cause the test suite to fail when they fail.

swainn commented 5 years ago

Oh and at least two of the xfail tests are failing b/c they are using deprecated xarray calls.

snowman2 commented 5 years ago

If I remember correctly, my logic here was to get the tests passing with the strictest tolerance possible. With all of the changes to GDAL and PROJ since I touched them, I would recommend regenerating the test files and manually inspecting them to see if they work.

snowman2 commented 5 years ago

Also, the tolerance is arbitrary. Maybe 2-3 decimal places would be better.

swainn commented 5 years ago

@snowman2 I agree, but I’m not familiar enough with the code to regenerate the test files and know if they are valid. I recommend either you do it or someone at ERDC that has an interest in those parts of the library. The core ORM functionality is working and test are passing, which is all I need at this point.