8000 Added test for uncovered line · matplotlib/matplotlib@18eb3e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 18eb3e7

Browse files
Added test for uncovered line
1 parent a9e9723 commit 18eb3e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_pyplot.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,11 @@ def test_multiple_same_figure_calls():
466466
assert fig is fig2
467467
fig3 = mpl.pyplot.figure(1) # Checks for false warnings
468468
assert fig is fig3
469+
470+
471+
def test_close_all_warning():
472+
fig1 = plt.figure()
473+
474+
# Check that the warning is issued when 'all' is passed to plt.figure
475+
with pytest.warns(UserWarning, match="closes all existing figures"):
476+
fig2 = plt.figure("all")

0 commit comments

Comments
 (0)
0