Skip to content

Commit b7a5cfd

Browse files
committed
TST: try forcing the dpi when testing saving after closing window
1 parent 2396e90 commit b7a5cfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def check_alt_backend(alt_backend):
220220
fig.canvas.mpl_connect("close_event", print)
221221

222222
result = io.BytesIO()
223-
fig.savefig(result, format='png')
223+
fig.savefig(result, format='png', dpi=100)
224224

225225
plt.show()
226226

@@ -230,7 +230,7 @@ def check_alt_backend(alt_backend):
230230
# When the figure is closed, it's manager is removed and the canvas is reset to
231231
# FigureCanvasBase. Saving should still be possible.
232232
result_after = io.BytesIO()
233-
fig.savefig(result_after, format='png')
233+
fig.savefig(result_after, format='png', dpi=100)
234234

235235
if backend.endswith("agg"):
236236
# agg-based interactive backends should save the same image as a non-interactive

0 commit comments

Comments
 (0)