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

Skip to content

Commit e56e3ba

Browse files
author
simonpf
committed
Added test cases for setting of capstyle and joinstyle attributes.
1 parent baa5b59 commit e56e3ba

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/matplotlib/tests/test_collections.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,22 @@ def test_lslw_bcast():
626626
assert_equal(col.get_linewidths(), [1, 2, 3])
627627

628628

629+
@pytest.mark.style('default')
630+
def test_capstyle():
631+
col = mcollections.PathCollection([], capstyle='round')
632+
assert_equal(col.get_capstyle(), 'round')
633+
col.set_capstyle('butt')
634+
assert_equal(col.get_capstyle(), 'butt')
635+
636+
637+
@pytest.mark.style('default')
638+
def test_joinstyle():
639+
col = mcollections.PathCollection([], joinstyle='round')
640+
assert_equal(col.get_joinstyle(), 'round')
641+
col.set_joinstyle('miter')
642+
assert_equal(col.get_joinstyle(), 'miter')
643+
644+
629645
@image_comparison(baseline_images=['scatter_post_alpha'],
630646
extensions=['png'], remove_text=True,
631647
style='default')

0 commit comments

Comments
 (0)