MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_never_update

Function test_never_update

lib/matplotlib/tests/test_backend_tk.py:162–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160@pytest.mark.flaky(reruns=3)
161@_isolated_tk_test(success_count=0)
162def test_never_update():
163 import tkinter
164 del tkinter.Misc.update
165 del tkinter.Misc.update_idletasks
166
167 import matplotlib.pyplot as plt
168 fig = plt.figure()
169 plt.show(block=False)
170
171 plt.draw() # Test FigureCanvasTkAgg.
172 tool = fig.canvas.toolbar.configure_subplots() # Test NavigationToolbar2Tk.
173 assert tool is not None
174 assert tool == fig.canvas.toolbar.configure_subplots() # Tool is reused internally.
175 # Test FigureCanvasTk filter_destroy callback
176 fig.canvas.get_tk_widget().after(100, plt.close, fig)
177
178 # Check for update() or update_idletasks() in the event queue, functionally
179 # equivalent to tkinter.Misc.update.
180 plt.show(block=True)
181
182 # Note that exceptions would be printed to stderr; _isolated_tk_test
183 # checks them.
184
185
186@_isolated_tk_test(success_count=2)

Callers

nothing calls this directly

Calls 5

figureMethod · 0.80
get_tk_widgetMethod · 0.80
showMethod · 0.45
drawMethod · 0.45
configure_subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…