()
| 223 | success = [] |
| 224 | |
| 225 | def check_focus(): |
| 226 | tkcanvas = fig.canvas.get_tk_widget() |
| 227 | # Give the plot window time to appear |
| 228 | if not tkcanvas.winfo_viewable(): |
| 229 | tkcanvas.wait_visibility() |
| 230 | # Make sure the canvas has the focus, so that it's able to receive |
| 231 | # keyboard events. |
| 232 | if tkcanvas.focus_lastfor() == tkcanvas: |
| 233 | success.append(True) |
| 234 | plt.close() |
| 235 | root.destroy() |
| 236 | |
| 237 | root = tk.Tk() |
| 238 | fig = plt.figure() |
nothing calls this directly
no test coverage detected
searching dependent graphs…