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

Function test_multipage_pagecount

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

Source from the content-addressed store, hash-verified

42
43
44def test_multipage_pagecount():
45 with PdfPages(io.BytesIO()) as pdf:
46 assert pdf.get_pagecount() == 0
47 fig, ax = plt.subplots()
48 ax.plot([1, 2, 3])
49 fig.savefig(pdf, format="pdf")
50 assert pdf.get_pagecount() == 1
51 pdf.savefig()
52 assert pdf.get_pagecount() == 2
53
54
55def test_multipage_properfinalize():

Callers

nothing calls this directly

Calls 5

PdfPagesClass · 0.90
get_pagecountMethod · 0.45
subplotsMethod · 0.45
plotMethod · 0.45
savefigMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…