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

Skip to content

Commit 3742ca1

Browse files
Test update is never called
1 parent 69e5b9e commit 3742ca1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,18 @@ def test_webagg():
186186
conn.close()
187187
proc.send_signal(signal.SIGINT)
188188
assert proc.wait(timeout=_test_timeout) == 0
189+
190+
191+
@pytest.mark.backend('TkAgg', skip_on_importerror=True)
192+
def test_never_update(monkeypatch):
193+
import tkinter
194+
monkeypatch.delattr(tkinter.Misc, 'update')
195+
monkeypatch.delattr(tkinter.Misc, 'update_idletasks')
196+
197+
import matplotlib.pyplot as plt
198+
plt.plot([1, 2, 3], [1, 3, 5])
199+
plt.show(block=False)
200+
fig = plt.gcf()
201+
fig.canvas.toolbar.configure_subplots()
202+
# skirt monkeypatch
203+
tkinter._default_root.tk.call('update')

0 commit comments

Comments
 (0)