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

Function test_multipage_keep_empty

lib/matplotlib/tests/test_backend_pdf.py:67–78  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

65
66
67def test_multipage_keep_empty(tmp_path):
68 # An empty pdf deletes itself afterwards.
69 fn = tmp_path / "a.pdf"
70 with PdfPages(fn) as pdf:
71 pass
72 assert not fn.exists()
73
74 # Test pdf files with content, they should never be deleted.
75 fn = tmp_path / "b.pdf"
76 with PdfPages(fn) as pdf:
77 pdf.savefig(plt.figure())
78 assert fn.exists()
79
80
81def test_composite_image():

Callers

nothing calls this directly

Calls 3

PdfPagesClass · 0.90
figureMethod · 0.80
savefigMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…