TST: make the WKB test robust for flavour of NaN#1123
TST: make the WKB test robust for flavour of NaN#1123jorisvandenbossche wants to merge 14 commits intoshapely:shapely-2.0from
Conversation
* keep tests for immutability
|
cc @musicinmybrain does this look OK to ensure it still works on big-endian hosts as well? |
|
Hmm, that didn't actually help for windows. Trying the approach used in pygeos then to check the unpacked bytes with |
The current code looks OK since it uses the I think that using |
|
Thanks! Yes, the final version that I pushed shouldn't be sensitive to little/big endian host anymore, since I force little_endian in the output. Of course that then also doesn't test the big endian is correct .. |
9f2015b to
62923e2
Compare
4437a92 to
6821fb8
Compare
3498c0c to
bc2e464
Compare
07fc570 to
12de7a5
Compare
|
The change from this PR is included in #1213, so closing this one. |
This
test_wkb.py::test_point_emptytest is failing on the shapely-2.0 branch with the latest pygeos. I think this is because pygeos is usingPy_NANto write the WKB with NaN values for empty geometries, andPy_NANmight be platform-dependent (the error on appveyor indicates the WKB includes a negative quiet NaN (-float(NaN)) instead of a plain quiet NaN, by checking on my linux laptop).So this PR tries to make the test more robust, by using the default NaN representation from the system on which the test is running (which should match with the NaN value that pygeos is using, I think).