We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e164fbb + 427b2f2 commit 7d73d72Copy full SHA for 7d73d72
lib/matplotlib/tests/test_backend_pdf.py
@@ -3,7 +3,6 @@
3
import io
4
import os
5
from pathlib import Path
6
-import sys
7
from tempfile import NamedTemporaryFile
8
9
import numpy as np
@@ -66,9 +65,9 @@ def test_multipage_properfinalize():
66
65
fig, ax = plt.subplots()
67
ax.set_title('This is a long title')
68
fig.savefig(pdf, format="pdf")
69
- pdfio.seek(0)
70
- assert sum(b'startxref' in line for line in pdfio) == 1
71
- assert sys.getsizeof(pdfio) < 40000
+ s = pdfio.getvalue()
+ assert s.count(b'startxref') == 1
+ assert len(s) < 40000
72
73
74
def test_multipage_keep_empty():
0 commit comments