MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_path_to_polygons

Function test_path_to_polygons

lib/matplotlib/tests/test_path.py:333–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

331
332
333def test_path_to_polygons():
334 data = [[10, 10], [20, 20]]
335 p = Path(data)
336
337 assert_array_equal(p.to_polygons(width=40, height=40), [])
338 assert_array_equal(p.to_polygons(width=40, height=40, closed_only=False),
339 [data])
340 assert_array_equal(p.to_polygons(), [])
341 assert_array_equal(p.to_polygons(closed_only=False), [data])
342
343 data = [[10, 10], [20, 20], [30, 30]]
344 closed_data = [[10, 10], [20, 20], [30, 30], [10, 10]]
345 p = Path(data)
346
347 assert_array_equal(p.to_polygons(width=40, height=40), [closed_data])
348 assert_array_equal(p.to_polygons(width=40, height=40, closed_only=False),
349 [data])
350 assert_array_equal(p.to_polygons(), [closed_data])
351 assert_array_equal(p.to_polygons(closed_only=False), [data])
352
353
354def test_path_deepcopy():

Callers

nothing calls this directly

Calls 2

to_polygonsMethod · 0.95
PathClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…