MCPcopy Create free account
hub / github.com/shapely/shapely / test_float_arg_array

Function test_float_arg_array

shapely/tests/test_constructive.py:91–109  ·  view source on GitHub ↗
(geometry, func)

Source from the content-addressed store, hash-verified

89@pytest.mark.parametrize("geometry", all_types)
90@pytest.mark.parametrize("func", CONSTRUCTIVE_FLOAT_ARG)
91def test_float_arg_array(geometry, func):
92 if (
93 func is shapely.offset_curve
94 and shapely.get_type_id(geometry) not in [1, 2]
95 and shapely.geos_version < (3, 11, 0)
96 ):
97 with pytest.raises(GEOSException, match="only accept linestrings"):
98 func([geometry, geometry], 0.0)
99 return
100 # voronoi_polygons emits an "invalid" warning when supplied with an empty
101 # point (see https://github.com/libgeos/geos/issues/515)
102 with ignore_invalid(
103 func is shapely.voronoi_polygons
104 and shapely.get_type_id(geometry) == 0
105 and shapely.geos_version < (3, 12, 0)
106 ):
107 actual = func([geometry, geometry], 0.0)
108 assert actual.shape == (2,)
109 assert isinstance(actual[0], Geometry)
110
111
112@pytest.mark.parametrize("geometry", all_types)

Callers

nothing calls this directly

Calls 2

ignore_invalidFunction · 0.90
funcFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…