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

Function test_rectangle_add_state

lib/matplotlib/tests/test_widgets.py:212–224  ·  view source on GitHub ↗
(ax)

Source from the content-addressed store, hash-verified

210
211
212def test_rectangle_add_state(ax):
213 tool = widgets.RectangleSelector(ax, interactive=True)
214 # Create rectangle
215 click_and_drag(tool, start=(70, 65), end=(125, 130))
216
217 with pytest.raises(ValueError):
218 tool.add_state('unsupported_state')
219
220 with pytest.raises(ValueError):
221 tool.add_state('clear')
222 tool.add_state('move')
223 tool.add_state('square')
224 tool.add_state('center')
225
226
227@pytest.mark.parametrize('add_state', [True, False])

Callers

nothing calls this directly

Calls 2

click_and_dragFunction · 0.90
add_stateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…