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

Skip to content

Commit e32aca3

Browse files
committed
Added test for warning
1 parent 9e5ab0b commit e32aca3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/tests/test_pyplot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,9 @@ def test_figure_hook():
457457
fig = plt.figure()
458458

459459
assert fig._test_was_here
460+
461+
462+
def test_multiple_same_figure_calls():
463+
with pytest.warns(UserWarning, match="Ignoring specified arguments in this call"):
464+
fig = mpl.pyplot.figure(1, figsize=(1, 2))
465+
fig = mpl.pyplot.figure(1, figsize=(3, 4))

0 commit comments

Comments
 (0)