8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e9723 commit 18eb3e7Copy full SHA for 18eb3e7
lib/matplotlib/tests/test_pyplot.py
@@ -466,3 +466,11 @@ def test_multiple_same_figure_calls():
466
assert fig is fig2
467
fig3 = mpl.pyplot.figure(1) # Checks for false warnings
468
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