Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/matplotlib/tests/test_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ def test_setp():
assert sio.getvalue() == ' zorder: float\n'


def test_artist_set():
line = mlines.Line2D([], [])
line.set(linewidth=7)
assert line.get_linewidth() == 7

# Property aliases should work
line.set(lw=5)
assert line.get_linewidth() == 5


def test_artist_set_invalid_property_raises():
"""
Test that set() raises AttributeError for invalid property names.
Expand Down
Loading