Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7d73169

Browse filesBrowse files
committed
TST: fix outward ticks test
1 parent d7d55e4 commit 7d73169
Copy full SHA for 7d73169

File tree

Expand file treeCollapse file tree

2 files changed

+9
-8
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-8
lines changed
Loading

‎lib/matplotlib/tests/test_tightlayout.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_tightlayout.py
+9-8Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,15 @@ def test_outward_ticks():
184184
ax.xaxis.set_tick_params(tickdir='out', length=32, width=3)
185185
ax.yaxis.set_tick_params(tickdir='out', length=32, width=3)
186186
plt.tight_layout()
187-
assert_array_equal(
188-
np.round([ax.get_position().get_points() for ax in fig.axes], 3),
189-
# These values were obtained after visual checking that they correspond
190-
# to a tight layouting that did take the ticks into account.
191-
[[[0.091, 0.590], [0.437, 0.903]],
192-
[[0.581, 0.590], [0.927, 0.903]],
193-
[[0.091, 0.140], [0.437, 0.454]],
194-
[[0.581, 0.140], [0.927, 0.454]]])
187+
# These values were obtained after visual checking that they correspond
188+
# to a tight layouting that did take the ticks into account.
189+
ans = [[[0.091, 0.607], [0.433, 0.933]],
190+
[[0.579, 0.607], [0.922, 0.933]],
191+
[[0.091, 0.140], [0.433, 0.466]],
192+
[[0.579, 0.140], [0.922, 0.466]]]
193+
for nn, ax in enumerate(fig.axes):
194+
assert_array_equal(np.round(ax.get_position().get_points(), 3),
195+
ans[nn])
195196

196197

197198
def add_offsetboxes(ax, size=10, margin=.1, color='black'):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.