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

Function test_legend_colors

lib/matplotlib/tests/test_rcparams.py:165–173  ·  view source on GitHub ↗
(color_type, param_dict, target)

Source from the content-addressed store, hash-verified

163@pytest.mark.parametrize('color_type, param_dict, target', legend_color_tests,
164 ids=legend_color_test_ids)
165def test_legend_colors(color_type, param_dict, target):
166 param_dict[f'legend.{color_type}color'] = param_dict.pop('color')
167 get_func = f'get_{color_type}color'
168
169 with mpl.rc_context(param_dict):
170 _, ax = plt.subplots()
171 ax.plot(range(3), label='test')
172 leg = ax.legend()
173 assert getattr(leg.legendPatch, get_func)() == target
174
175
176def test_mfc_rcparams():

Callers

nothing calls this directly

Calls 4

popMethod · 0.45
subplotsMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…