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

Function test_set_alpha

lib/matplotlib/tests/test_artist.py:329–338  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

327
328
329def test_set_alpha():
330 art = martist.Artist()
331 with pytest.raises(TypeError, match='^alpha must be numeric or None'):
332 art.set_alpha('string')
333 with pytest.raises(TypeError, match='^alpha must be numeric or None'):
334 art.set_alpha([1, 2, 3])
335 with pytest.raises(ValueError, match="outside 0-1 range"):
336 art.set_alpha(1.1)
337 with pytest.raises(ValueError, match="outside 0-1 range"):
338 art.set_alpha(np.nan)
339
340
341def test_set_alpha_for_array():

Callers

nothing calls this directly

Calls 1

set_alphaMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…