Patch matplotlib function 'use
(enable_gui_function)
| 102 | |
| 103 | |
| 104 | def patch_use(enable_gui_function): |
| 105 | """Patch matplotlib function 'use'""" |
| 106 | matplotlib = sys.modules["matplotlib"] |
| 107 | |
| 108 | def patched_use(*args, **kwargs): |
| 109 | matplotlib.real_use(*args, **kwargs) |
| 110 | gui, backend = find_gui_and_backend() |
| 111 | enable_gui_function(gui) |
| 112 | |
| 113 | matplotlib.real_use = matplotlib.use |
| 114 | matplotlib.use = patched_use |
| 115 | |
| 116 | |
| 117 | def patch_is_interactive(): |
no outgoing calls
no test coverage detected