MCPcopy
hub / github.com/matplotlib/matplotlib / test_colorbar_errors

Function test_colorbar_errors

lib/matplotlib/tests/test_colorbar.py:1218–1224  ·  view source on GitHub ↗
(kwargs, error, message)

Source from the content-addressed store, hash-verified

1216 "invalid value for extendfrac"),
1217 ])
1218def test_colorbar_errors(kwargs, error, message):
1219 fig, ax = plt.subplots()
1220 im = ax.imshow([[0, 1], [2, 3]])
1221 if kwargs.get('cax', None) is True:
1222 kwargs['cax'] = ax.inset_axes([0, 1.05, 1, 0.05])
1223 with pytest.raises(error, match=message):
1224 fig.colorbar(im, **kwargs)
1225
1226
1227def test_colorbar_axes_parameters():

Callers

nothing calls this directly

Calls 5

imshowMethod · 0.80
inset_axesMethod · 0.80
subplotsMethod · 0.45
getMethod · 0.45
colorbarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…