8000 Backport PR #12262: Simplify empty-rasterized pdf test. · matplotlib/matplotlib@11a98ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 11a98ac

Browse files
QuLogicMeeseeksDev[bot]
authored andcommitted
Backport PR #12262: Simplify empty-rasterized pdf test.
1 parent 3af90eb commit 11a98ac

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/tests/test_backend_pdf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,8 @@ def test_failing_latex(tmpdir):
234234
plt.savefig(path)
235235

236236

237-
def test_empty_rasterised():
237+
def test_empty_rasterized():
238238
# Check that emtpy figures that are rasterised save to pdf files fine
239-
with PdfPages(io.BytesIO()) as pdf:
240-
fig, ax = plt.subplots()
241-
ax.plot([], [], rasterized=True)
242-
fig.savefig(pdf, format="pdf")
239+
fig, ax = plt.subplots()
240+
ax.plot([], [], rasterized=True)
241+
fig.savefig(io.BytesIO(), format="pdf")

0 commit comments

Comments
 (0)
0