Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with geos 3.9.0 #1079

Closed
hjaekel opened this issue Jan 30, 2021 · 2 comments
Closed

Test failure with geos 3.9.0 #1079

hjaekel opened this issue Jan 30, 2021 · 2 comments

Comments

@hjaekel
Copy link

hjaekel commented Jan 30, 2021

Expected behavior and actual behavior.

The test SvgTestCase.test_collection fails for Shapely 1.7.1 with geos 3.9.0.

======================================================================
FAIL: test_collection (tests.test_svg.SvgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/builder/package/community/py3-shapely/src/Shapely-1.7.1/tests/test_svg.py", line 176, in test_collection
    self.assertSVG(
  File "/home/builder/package/community/py3-shapely/src/Shapely-1.7.1/tests/test_svg.py", line 41, in assertSVG
    self.assertEqual(svg_elem, expected)
AssertionError: '<g><polyline fill="none" stroke="#66cc99" str[158 chars]</g>' != '<g><circle cx="7.0" cy="3.0" r="3.0" stroke="[158 chars]</g>'
- <g><polyline fill="none" stroke="#66cc99" stroke-width="2.0" points="4.0,2.0 8.0,4.0" opacity="0.8" /><circle cx="7.0" cy="3.0" r="3.0" stroke="#555555" stroke-width="1.0" fill="#66cc99" opacity="0.6" /></g>
+ <g><circle cx="7.0" cy="3.0" r="3.0" stroke="#555555" stroke-width="1.0" fill="#66cc99" opacity="0.6" /><polyline fill="none" stroke="#66cc99" stroke-width="2.0" points="4.0,2.0 8.0,4.0" opacity="0.8" /></g>

So just the order of the polyline and the circle in the SVG changed.

Steps to reproduce the problem.

Use python3 setup.py build

Operating system

Alpine Linux Edge

Shapely version and provenance

Shapely 1.7.1

@jorisvandenbossche
Copy link
Member

Yes, the coordinate pair order has changed for several operations in GEOS 3.9.0, and hence causing some failures in existing tests.
This has been fixed in the meantime: #1042 (note that it is only the test itself that failed due to a slightly changed expected result, there is no actualy runtime failure when using Shapely 1.7 with GEOS 3.9.0)

@sgillies
Copy link
Contributor

sgillies commented Feb 1, 2021

@jorisvandenbossche thanks for the explanation! @hjaekel there will be a fix when 1.8.0 is released. That's a little ways out yet.

@sgillies sgillies closed this as completed Feb 1, 2021
mwtoews added a commit to mwtoews/shapely that referenced this issue Feb 9, 2021
mwtoews added a commit that referenced this issue Feb 9, 2021
* CI: move Travis linux builds to Github Actions
* Fix failing test from GEOS 3.9.0; closes #1079
* Copy install_geos.sh from master (from #1042)
* Avoid ModuleNotFoundError: No module named 'pylab'
* Manually cherry-pick parts of #997 to fix doctests
expeditioneer added a commit to expeditioneer/gentoo-portage that referenced this issue Mar 6, 2021
Related Upsteam Issue: shapely/shapely#1079

Closes: https://bugs.gentoo.org/765745
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Package-Manager: Portage-3.0.13, Repoman-3.0.2
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Mar 6, 2021
Related Upsteam Issue: shapely/shapely#1079

Bug: https://bugs.gentoo.org/765745
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Closes: #19797
Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants