Skip to content

Commit 5ece54c

Browse files
tacaswellQuLogic
andauthored
MNT: use BytesIO contextmanager
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent d9b7933 commit 5ece54c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8455,5 +8455,5 @@ def test_zorder_and_explicit_rasterization():
84558455
fig, ax = plt.subplots()
84568456
ax.set_rasterization_zorder(5)
84578457
ln, = ax.plot(range(5), rasterized=True, zorder=1)
8458-
b = io.BytesIO()
8459-
fig.savefig(b, format='pdf')
8458+
with io.BytesIO() as b:
8459+
fig.savefig(b, format='pdf')

0 commit comments

Comments
 (0)