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

Skip to content

Commit 2df0492

Browse files
authored
TST: add basic test for set (#31058)
1 parent 42e142d commit 2df0492

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lib/matplotlib/tests/test_artist.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,16 @@ def test_setp():
259259
assert sio.getvalue() == ' zorder: float\n'
260260

261261

262+
def test_artist_set():
263+
line = mlines.Line2D([], [])
264+
line.set(linewidth=7)
265+
assert line.get_linewidth() == 7
266+
267+
# Property aliases should work
268+
line.set(lw=5)
269+
assert line.get_linewidth() == 5
270+
271+
262272
def test_artist_set_invalid_property_raises():
263273
"""
264274
Test that set() raises AttributeError for invalid property names.

0 commit comments

Comments
 (0)