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

Skip to content

Commit ca0515a

Browse files
committed
TST: Expect UserWarning when labels manually removed before CS.remove()
1 parent d35b9cd commit ca0515a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/tests/test_contour.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,8 @@ def test_contour_remove_with_labels():
811811
for label in labels:
812812
label.remove()
813813
cs.clabel()
814-
cs.remove()
814+
with pytest.warns(UserWarning, match="Some labels were manually removed"):
815+
cs.remove()
815816

816817

817818
def test_contour_no_args():

0 commit comments

Comments
 (0)