(color_type, param_dict, target)
| 163 | @pytest.mark.parametrize('color_type, param_dict, target', legend_color_tests, |
| 164 | ids=legend_color_test_ids) |
| 165 | def 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 | |
| 176 | def test_mfc_rcparams(): |