8000 Run flush events on wx only · matplotlib/matplotlib@6c7ab77 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c7ab77

Browse files
committed
Run flush events on wx only
As apparently dropping this was needed for Tk.
1 parent 34d7183 commit 6c7ab77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ def _test_thread_impl():
196196
plt.pause(0.5) # flush_events fails here on at least Tkagg (bpo-41176)
197197
future.result() # Joins the thread; rethrows any exception.
198198
plt.close() # backend is responsible for flushing any events here
199-
fig.canvas.flush_events() # TODO: debug why WX needs this only on py3.8
199+
if plt.rcParams["backend"].startswith("WX"):
200+
# TODO: debug why WX needs this only on py3.8
201+
fig.canvas.flush_events()
200202

201203

202204
_thread_safe_backends = _get_testable_interactive_backends()

0 commit comments

Comments
 (0)
0