File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,12 @@ def check_alt_backend(alt_backend):
216216 fig .canvas .mpl_connect ("draw_event" , lambda event : timer .start ())
217217 fig .canvas .mpl_connect ("close_event" , print )
218218
219+ plt .show ()
220+
221+ size_inches = fig .get_size_inches ()
219222 result = io .BytesIO ()
220223 fig .savefig (result , format = 'png' )
221224
222- plt .show ()
223-
224225 # Ensure that the window is really closed.
225226 plt .pause (0.5 )
226227
@@ -229,6 +230,8 @@ def check_alt_backend(alt_backend):
229230 result_after = io .BytesIO ()
230231 fig .savefig (result_after , format = 'png' )
231232
233+ assert tuple (fig .get_size_inches ()) == tuple (size_inches ), \
234+ f"{ fig .get_size_inches ()} , { size_inches } "
232235 assert result .getvalue () == result_after .getvalue ()
233236
234237
You can’t perform that action at this time.
0 commit comments