(monkeypatch)
| 31 | |
| 32 | |
| 33 | def test_show(monkeypatch): |
| 34 | mpl_test_backend = SimpleNamespace(**vars(backend_template)) |
| 35 | mock_show = MagicMock() |
| 36 | monkeypatch.setattr( |
| 37 | mpl_test_backend.FigureManagerTemplate, "pyplot_show", mock_show) |
| 38 | monkeypatch.setitem(sys.modules, "mpl_test_backend", mpl_test_backend) |
| 39 | mpl.use("module://mpl_test_backend") |
| 40 | plt.show() |
| 41 | mock_show.assert_called_with() |
| 42 | |
| 43 | |
| 44 | def test_show_old_global_api(monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…