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

Function test_lasso_selector_set_props

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

Source from the content-addressed store, hash-verified

1009
1010
1011def test_lasso_selector_set_props(ax):
1012 onselect = mock.Mock(spec=noop, return_value=None)
1013
1014 tool = widgets.LassoSelector(ax, onselect=onselect,
1015 props=dict(color='b', alpha=0.2))
1016
1017 artist = tool._selection_artist
1018 assert mcolors.same_color(artist.get_color(), 'b')
1019 assert artist.get_alpha() == 0.2
1020 tool.set_props(color='r', alpha=0.3)
1021 assert mcolors.same_color(artist.get_color(), 'r')
1022 assert artist.get_alpha() == 0.3
1023
1024
1025def test_lasso_set_props(ax):

Callers

nothing calls this directly

Calls 3

set_propsMethod · 0.80
get_colorMethod · 0.45
get_alphaMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…