Skip to content

[Bug] pygrass/vector – test_geometry fails with GEOS 3.12 #4117

@nilason

Description

@nilason

pygrass/vector – test_geometry fails with GEOS 3.12, (Python 3.12 and Numpy 2.0.1) at least on Mac, which is a regression compared to current CI setup with GEOS 3.11 (Python 3.11 and Numpy 1.26.4).

test_geometry

./python/grass/pygrass/vector – test_geometry

❌ Test failed

Test	test_geometry
Testsuite	./python/grass/pygrass/vector
Test file	./python/grass/pygrass/vector/testsuite/test_geometry.py
Status	FAILED
Return code	1
Number of tests	33
Successful tests	25
Failed tests	7
Percent successful	76%
Test duration	0:00:00.361684
Supplementary files

standard output (stdout)
standard error output (stderr)
Standard error output (stderr)

Building topology for vector map <AreaTestCase_map@__python_grass_pygrass_vector_test_geometry_Mac_1722423178195_local_28327>...
Registering primitives...

Building areas...
0..9..18..27..36..45..54..63..72..81..90..100
Attaching islands...
0..50..100
Attaching centroids...
0..25..50..75..100
.FFF..F..FBuilding topology for vector map <LineTestCase_map@__python_grass_pygrass_vector_test_geometry_Mac_1722423178195_local_28327>...
Registering primitives...

Building areas...
0..9..18..27..36..45..54..63..72..81..90..100
Attaching islands...
0..50..100
Attaching centroids...
0..25..50..75..100
.......FBuilding topology for vector map <NodeTestCase_map@__python_grass_pygrass_vector_test_geometry_Mac_1722423178195_local_28327>...
Registering primitives...

....s........F.
======================================================================
FAIL: test_boundaries_1 (__main__.AreaTestCase.test_boundaries_1)
Test boundary access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 350, in test_boundaries_1
    self.assertEqual(boundary.to_wkt(), string_list[i])
AssertionError: 'LINESTRING (0 0, 0 4)' != 'LINESTRING (0.0000000000000000 0.0000000000000000, 0.0[31 chars]000)'
- LINESTRING (0 0, 0 4)
+ LINESTRING (0.0000000000000000 0.0000000000000000, 0.0000000000000000 4.0000000000000000)


======================================================================
FAIL: test_boundaries_2 (__main__.AreaTestCase.test_boundaries_2)
Test boundary access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 361, in test_boundaries_2
    self.assertEqual(
AssertionError: 'POINT (5.5 3.5)' != 'POINT (5.5000000000000000 3.5000000000000000)'
- POINT (5.5 3.5)
+ POINT (5.5000000000000000 3.5000000000000000)


======================================================================
FAIL: test_centroid (__main__.AreaTestCase.test_centroid)
Test centroid access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 328, in test_centroid
    self.assertEqual(
AssertionError: 'POINT (3.5 3.5)' != 'POINT (3.5000000000000000 3.5000000000000000)'
- POINT (3.5 3.5)
+ POINT (3.5000000000000000 3.5000000000000000)


======================================================================
FAIL: test_isles_1 (__main__.AreaTestCase.test_isles_1)
Test centroid access
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 379, in test_isles_1
    self.assertEqual(
AssertionError: 'LINESTRING (1 1, 3 1, 3 3, 1 3, 1 1)' != 'LINESTRING (1.0000000000000000 1.0000000000000000, 3.0[148 chars]000)'
- LINESTRING (1 1, 3 1, 3 3, 1 3, 1 1)
+ LINESTRING (1.0000000000000000 1.0000000000000000, 3.0000000000000000 1.0000000000000000, 3.0000000000000000 3.0000000000000000, 1.0000000000000000 3.0000000000000000, 1.0000000000000000 1.0000000000000000)


======================================================================
FAIL: test_to_wkt (__main__.AreaTestCase.test_to_wkt)
Test to_wkt method
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 301, in test_to_wkt
    self.assertEqual(area.to_wkt(), string)
AssertionError: 'POLYGON ((0 0, 0 4, 0 4, 4 4, 4 4, 4 0, 4 0, 0 0), ([21 chars] 1))' != 'POLYGON ((0.0000000000000000 0.0000000000000000, 0.0[463 chars]00))'
- POLYGON ((0 0, 0 4, 0 4, 4 4, 4 4, 4 0, 4 0, 0 0), (1 1, 3 1, 3 3, 1 3, 1 1))
+ POLYGON ((0.0000000000000000 0.0000000000000000, 0.0000000000000000 4.0000000000000000, 0.0000000000000000 4.0000000000000000, 4.0000000000000000 4.0000000000000000, 4.0000000000000000 4.0000000000000000, 4.0000000000000000 0.0000000000000000, 4.0000000000000000 0.0000000000000000, 0.0000000000000000 0.0000000000000000), (1.0000000000000000 1.0000000000000000, 3.0000000000000000 1.0000000000000000, 3.0000000000000000 3.0000000000000000, 1.0000000000000000 3.0000000000000000, 1.0000000000000000 1.0000000000000000))


======================================================================
FAIL: test_to_wkt (__main__.LineTestCase.test_to_wkt)
Test to_wkt method
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 165, in test_to_wkt
    self.assertEqual(Line([(0, 0), (1, 1)]).to_wkt(), string)
AssertionError: 'LINESTRING (0 0, 1 1)' != 'LINESTRING (0.0000000000000000 0.0000000000000000, 1.0[31 chars]000)'
- LINESTRING (0 0, 1 1)
+ LINESTRING (0.0000000000000000 0.0000000000000000, 1.0000000000000000 1.0000000000000000)


======================================================================
FAIL: test_to_wkt (__main__.PointTestCase.test_to_wkt)
Test coords method
----------------------------------------------------------------------
Traceback (most recent call last):
  File "python/grass/pygrass/vector/testsuite/test_geometry.py", line 63, in test_to_wkt
    self.assertEqual(
AssertionError: 'POINT (1 2)' != 'POINT (1.0000000000000000 2.0000000000000000)'
- POINT (1 2)
+ POINT (1.0000000000000000 2.0000000000000000)


----------------------------------------------------------------------
Ran 33 tests in 0.194s
FAILED (failures=7, skipped=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    PythonRelated code is in PythonbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions