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 161a81b

Browse filesBrowse files
committed
TST: fix tests
1 parent 9bb232b commit 161a81b
Copy full SHA for 161a81b

File tree

Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed

‎lib/matplotlib/tests/test_text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_text.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ def test_annotation_units(fig_test, fig_ref):
618618
def test_large_subscript_title():
619619
# Remove this line when this test image is regenerated.
620620
plt.rcParams['text.kerning_factor'] = 6
621+
plt.rcParams['axes.titley'] = None
621622

622623
fig, axs = plt.subplots(1, 2, figsize=(9, 2.5), constrained_layout=True)
623624
ax = axs[0]
@@ -626,9 +627,7 @@ def test_large_subscript_title():
626627
ax.set_xticklabels('')
627628

628629
ax = axs[1]
629-
tt = ax.set_title(r'$\sum_{i} x_i$')
630-
x, y = tt.get_position()
631-
tt.set_position((x, 1.01))
630+
tt = ax.set_title(r'$\sum_{i} x_i$', y=1.01)
632631
ax.set_title('Old Way', loc='left')
633632
ax.set_xticklabels('')
634633

‎lib/matplotlib/tests/test_tightlayout.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_tightlayout.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def example_plot(ax, fontsize=12):
1919
ax.set_title('Title', fontsize=fontsize)
2020

2121

22-
@image_comparison(['tight_layout1'])
22+
@image_comparison(['tight_layout1'], tol=1.9)
2323
def test_tight_layout1():
2424
"""Test tight_layout for a single subplot."""
2525
fig, ax = plt.subplots()
@@ -115,7 +115,7 @@ def test_tight_layout6():
115115
h_pad=0.45)
116116

117117

118-
@image_comparison(['tight_layout7'])
118+
@image_comparison(['tight_layout7'], tol=1.9)
119119
def test_tight_layout7():
120120
# tight layout with left and right titles
121121
fontsize = 24

0 commit comments

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