Thanks to visit codestin.com Credit goes to github.com
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.
1 parent 09ab2c2 commit 427b2f2Copy full SHA for 427b2f2
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