MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_fig_close

Function test_fig_close

lib/matplotlib/tests/test_backend_qt.py:30–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29@pytest.mark.backend('QtAgg', skip_on_importerror=True)
30def test_fig_close():
31
32 # save the state of Gcf.figs
33 init_figs = copy.copy(Gcf.figs)
34
35 # make a figure using pyplot interface
36 fig = plt.figure()
37
38 # simulate user clicking the close button by reaching in
39 # and calling close on the underlying Qt object
40 fig.canvas.manager.window.close()
41
42 # assert that we have removed the reference to the FigureManager
43 # that got added by plt.figure()
44 assert init_figs == Gcf.figs
45
46
47@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

figureMethod · 0.80
copyMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…