MCPcopy Create free account
hub / github.com/Notgnoshi/generative / test_serialize_flat_polygon

Function test_serialize_flat_polygon

tests/test_wkio.py:97–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95
96
97def test_serialize_flat_polygon():
98 expected = [
99 "(0.0, 1.0)\tPOLYGON_BEGIN SHELL_BEGIN\n",
100 "(2.0, 3.0)\n",
101 "(4.0, 5.0)\n",
102 "(0.0, 1.0)\tSHELL_END POLYGON_END\n",
103 ]
104 geoms = [Polygon(shell=[(0, 1), (2, 3), (4, 5), (0, 1)])]
105 output = io.StringIO()
106 serialize_flat(flatten(geoms), output)
107 output.seek(0)
108
109 actual = output.readlines()
110 assert actual == expected
111
112
113def test_serialize_flat_polygon_with_holes():

Callers

nothing calls this directly

Calls 2

serialize_flatFunction · 0.90
flattenFunction · 0.90

Tested by

no test coverage detected