Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d7d55e4

Browse files
committed
TST: add to get_extents test
1 parent b1301f1 commit d7d55e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/tests/test_get_extents.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ def test_normal_axes():
8484
targetbb = mtransforms.Bbox.from_bounds(*target)
8585
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8686

87+
# test that get_position roundtrips to get_window_extent
88+
axbb = ax.get_position().transformed(fig.transFigure).bounds
89+
assert_array_almost_equal(axbb, ax.get_window_extent().bounds, decimal=2)
90+
91+
8792

8893
def test_nodecorator():
8994
with rc_context({'_internal.classic_mode': False}):

0 commit comments

Comments
 (0)