Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6d2d48

Browse files
committed
Add valid color test
1 parent e5401c3 commit c6d2d48

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/matplotlib/tests/test_lines.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def test_line_colors():
100100
fig.canvas.draw()
101101

102102

103+
def test_valid_colors():
104+
line = mlines.Line2D([], [])
105+
with pytest.raises(ValueError):
106+
line.set_color("foobar")
107+
108+
103109
def test_linestyle_variants():
104110
fig = plt.figure()
105111
ax = fig.add_subplot(1, 1, 1)

0 commit comments

Comments
 (0)