8000 Test update is never called · matplotlib/matplotlib@c94c5f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit c94c5f9

Browse files
Test update is never called
1 parent 630e806 commit c94c5f9

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
@@ -194,3 +194,18 @@ def test_webagg():
194194
conn.close()
195195
proc.send_signal(signal.SIGINT)
196196
assert proc.wait(timeout=_test_timeout) == 0
197+
198+
199+
@pytest.mark.backend('TkAgg', skip_on_importerror=True)
200+
def test_never_update(monkeypatch):
201+
import tkinter
202+
monkeypatch.delattr(tkinter.Misc, 'update')
203+
monkeypatch.delattr(tkinter.Misc, 'update_idletasks')
204+
205+
import matplotlib.pyplot as plt
206+
plt.plot([1, 2, 3], [1, 3, 5])
207+
plt.show(block=False)
208+
fig = plt.gcf()
209+
fig.canvas.toolbar.configure_subplots()
210+
# skirt monkeypatch
211+
tkinter._default_root.tk.call('update')

0 commit comments

Comments
 (0)
0