Skip to content

Commit

Permalink
MNT: Debug fig_size change after window close
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Nov 12, 2024
1 parent ca39d41 commit d047a36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def check_alt_backend(alt_backend):

result = io.BytesIO()
fig.savefig(result, format='png')
fig.savefig('result.png')
size_inches = fig.get_size_inches()

plt.show()

Expand All @@ -228,7 +230,10 @@ def check_alt_backend(alt_backend):
# is not deleted.
result_after = io.BytesIO()
fig.savefig(result_after, format='png')
fig.savefig('result_after.png')

assert tuple(fig.get_size_inches()) == tuple(size_inches), \
f"{fig.get_size_inches()}, {size_inches}"
assert result.getvalue() == result_after.getvalue()


Expand Down

0 comments on commit d047a36

Please sign in to comment.