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

Skip to content

Commit 59d5c06

Browse files
increase event loop time for CI, cleanup imports
1 parent bbb82ac commit 59d5c06

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def test_interactive_backend(backend, toolbar):
177177
import json
178178
import sys
179179
import threading
180-
from unittest import TestCase
181180
182181
from matplotlib import pyplot as plt, rcParams
183182
rcParams.update({
@@ -186,14 +185,12 @@ def test_interactive_backend(backend, toolbar):
186185
})
187186
if len(sys.argv) >= 2: # Second argument is json-encoded rcParams.
188187
rcParams.update(json.loads(sys.argv[1]))
189-
assert_equal = TestCase().assertEqual
190-
assert_raises = TestCase().assertRaises
191188
192189
# Test artist creation and drawing does not crash from thread
193190
# No other guarantees!
194191
fig, ax = plt.subplots()
195192
# plt.pause needed vs plt.show(block=False) at least on toolbar2-tkagg
196-
plt.pause(0.1)
193+
plt.pause(0.5)
197194
198195
exc_info = None
199196
@@ -226,7 +223,7 @@ def thread_draw_work():
226223
t = threading.Thread(target=thread_draw_work)
227224
fig.canvas.mpl_connect("close_event", print)
228225
t.start()
229-
plt.pause(0.1) # flush_events fails here on at least Tkagg (bpo-41176)
226+
plt.pause(0.5) # flush_events fails here on at least Tkagg (bpo-41176)
230227
t.join()
231228
plt.close()
232229
fig.canvas.flush_events() # pause doesn't process events after close

0 commit comments

Comments
 (0)