TST: fix tests on Windows for python >= 3.8#1213
TST: fix tests on Windows for python >= 3.8#1213jorisvandenbossche merged 10 commits intoshapely:shapely-2.0from
Conversation
cd68164 to
317f1e9
Compare
|
The best solution is to copy the DLLs, as the PATH fix doesn't work as found in pygeos/pygeos#382 |
|
Hmm, OK, I hoped that setting the path here would work, as copying the geos dlls into the pygeos directory is not that straightforward here, since we pip install pygeos (so I would need to find a robust way to get the path to the pygeos install location). I also don't want to spend too much time on it, because after #1211, the next step would be to move the pygeos' repo content in here, and then one of the first steps would be to consolidate the CI scripts (and pygeos' scripts are already handling this fine). So temporarily disabling the windows tests for python >=3.8 (as I now did in #1211) is maybe also good enough |
|
Maybe temporarily use |
|
I would do that in the testing code? (eg in conftest.py) |
|
In theory it would need to be |
|
As the error stems from |
|
@mwtoews thanks for the help! This seems to be working, as there is now an actual failure: |
|
Empty strikes again! Looks familiar. PostGIS decodes both to |
|
Yes, both are valid representations (different kind of NaN values), but so when converting to WKB, which of the two you get depends on your architecture. What I added here makes that test more robust by asserting the bytes represent NaN, instead of hardcoding exactly the expected bytes (this is what we do in pygeos). |
|
This now includes the change I originally did in #1123 |
|
Last suggestion is to clean-up the "Checking geos_c.dll" section in |
|
Green! :) |
appveyor.yml
Outdated
| #- python -c "import shapely; print(shapely.__version__)" | ||
| #- python -c "from shapely.geos import geos_version_string; print(geos_version_string)" | ||
| #- python -c "from shapely import speedups; assert speedups.enabled" | ||
| #- python -c "from shapely import vectorized" |
There was a problem hiding this comment.
Maybe now try uncommenting the above lines?
There was a problem hiding this comment.
Actually, I think those simply can be removed. Both modules still exist, but are just a small shim not doing anything special for backwards compatibility (eg shapely.speedups just includes raising deprecation warnings). I don't think it is needed to specifically test those imports now.
With pygeos installed, the tests on appveyor are failing for Python >= 3.8 (failing to import pygeos because it doesn't find GEOS). I assume this is related to the changes in python how it finds (or does not find) DLLs, and you need to explicitly put them on the path.