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

Function test_gcf

lib/matplotlib/tests/test_pickle.py:166–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164
165
166def test_gcf():
167 fig = plt.figure("a label")
168 buf = BytesIO()
169 pickle.dump(fig, buf, pickle.HIGHEST_PROTOCOL)
170 plt.close("all")
171 assert plt._pylab_helpers.Gcf.figs == {} # No figures must be left.
172 fig = pickle.loads(buf.getbuffer())
173 assert plt._pylab_helpers.Gcf.figs != {} # A manager is there again.
174 assert fig.get_label() == "a label"
175
176
177def test_no_pyplot():

Callers

nothing calls this directly

Calls 3

figureMethod · 0.80
closeMethod · 0.45
get_labelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…