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

Function test_negative_rect

lib/matplotlib/tests/test_patches.py:236–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234
235
236def test_negative_rect():
237 # These two rectangles have the same vertices, but starting from a
238 # different point. (We also drop the last vertex, which is a duplicate.)
239 pos_vertices = Rectangle((-3, -2), 3, 2).get_verts()[:-1]
240 neg_vertices = Rectangle((0, 0), -3, -2).get_verts()[:-1]
241 assert_array_equal(np.roll(neg_vertices, 2, 0), pos_vertices)
242
243
244@image_comparison(['clip_to_bbox.png'], style='mpl20')

Callers

nothing calls this directly

Calls 2

RectangleClass · 0.90
get_vertsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…