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

Skip to content

Commit 41a5adf

Browse files
committed
Remove kerning_factor from tests
1 parent b3ad40a commit 41a5adf

File tree

8 files changed

+1
-35
lines changed

8 files changed

+1
-35
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# This patch should go on top of the "classic" style and exists solely to avoid
22
# changing baseline images.
33

4-
text.kerning_factor : 6
5-
64
ytick.alignment: center_baseline
75

86
hatch.color: edge

lib/matplotlib/tests/test_artist.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,6 @@ def test_remove():
217217

218218
@image_comparison(["default_edges.png"], remove_text=True, style='default')
219219
def test_default_edges():
220-
# Remove this line when this test image is regenerated.
221-
plt.rcParams['text.kerning_factor'] = 6
222-
223220
fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2)
224221

225222
ax1.plot(np.arange(10), np.arange(10), 'x',

lib/matplotlib/tests/test_legend.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ def test_legend_expand():
246246
@image_comparison(['hatching'], remove_text=True, style='default')
247247
def test_hatching():
248248
# Remove legend texts when this image is regenerated.
249-
# Remove this line when this test image is regenerated.
250-
plt.rcParams['text.kerning_factor'] = 6
251-
252249
fig, ax = plt.subplots()
253250

254251
# Patches

lib/matplotlib/tests/test_text.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ def test_multiline():
139139

140140
@image_comparison(['multiline2'], style='mpl20')
141141
def test_multiline2():
142-
# Remove this line when this test image is regenerated.
143-
plt.rcParams['text.kerning_factor'] = 6
144-
145142
fig, ax = plt.subplots()
146143

147144
ax.set_xlim([0, 1.4])
@@ -685,8 +682,6 @@ def test_annotation_units(fig_test, fig_ref):
685682

686683
@image_comparison(['large_subscript_title.png'], style='mpl20')
687684
def test_large_subscript_title():
688-
# Remove this line when this test image is regenerated.
689-
plt.rcParams['text.kerning_factor'] = 6
690685
plt.rcParams['axes.titley'] = None
691686

692687
fig, axs = plt.subplots(1, 2, figsize=(9, 2.5), constrained_layout=True)

lib/mpl_toolkits/axisartist/tests/test_axis_artist.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ def test_ticks():
2626

2727
@image_comparison(['axis_artist_labelbase.png'], style='default')
2828
def test_labelbase():
29-
# Remove this line when this test image is regenerated.
30-
plt.rcParams['text.kerning_factor'] = 6
31-
3229
fig, ax = plt.subplots()
3330

3431
ax.plot([0.5], [0.5], "o")
@@ -43,9 +40,6 @@ def test_labelbase():
4340

4441
@image_comparison(['axis_artist_ticklabels.png'], style='default')
4542
def test_ticklabels():
46-
# Remove this line when this test image is regenerated.
47-
plt.rcParams['text.kerning_factor'] = 6
48-
4943
fig, ax = plt.subplots()
5044

5145
ax.xaxis.set_visible(False)
@@ -78,9 +72,6 @@ def test_ticklabels():
7872

7973
@image_comparison(['axis_artist.png'], style='default')
8074
def test_axis_artist():
81-
# Remove this line when this test image is regenerated.
82-
plt.rcParams['text.kerning_factor'] = 6
83-
8475
fig, ax = plt.subplots()
8576

8677
ax.xaxis.set_visible(False)

lib/mpl_toolkits/axisartist/tests/test_axislines.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
@image_comparison(['SubplotZero.png'], style='default')
1111
def test_SubplotZero():
12-
# Remove this line when this test image is regenerated.
13-
plt.rcParams['text.kerning_factor'] = 6
14-
1512
fig = plt.figure()
1613

1714
ax = SubplotZero(fig, 1, 1, 1)
@@ -30,9 +27,6 @@ def test_SubplotZero():
3027

3128
@image_comparison(['Subplot.png'], style='default')
3229
def test_Subplot():
33-
# Remove this line when this test image is regenerated.
34-
plt.rcParams['text.kerning_factor'] = 6
35-
3630
fig = plt.figure()
3731

3832
ax = Subplot(fig, 1, 1, 1)

lib/mpl_toolkits/axisartist/tests/test_floating_axes.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ def test_curvelinear3():
6969
# remove when image is regenerated.
7070
@image_comparison(['curvelinear4.png'], style='default', tol=0.9)
7171
def test_curvelinear4():
72-
# Remove this line when this test image is regenerated.
73-
plt.rcParams['text.kerning_factor'] = 6
74-
7572
fig = plt.figure(figsize=(5, 5))
7673

7774
tr = (mtransforms.Affine2D().scale(np.pi / 180, 1) +

lib/mpl_toolkits/axisartist/tests/test_grid_helper_curvelinear.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@ def test_polar_box():
136136
ax1.grid(True)
137137

138138

139-
# Remove tol & kerning_factor when this test image is regenerated.
140-
@image_comparison(['axis_direction.png'], style='default', tol=0.13)
139+
@image_comparison(['axis_direction.png'], style='default', tol=0.04)
141140
def test_axis_direction():
142-
plt.rcParams['text.kerning_factor'] = 6
143-
144141
fig = plt.figure(figsize=(5, 5))
145142

146143
# PolarAxes.PolarTransform takes radian. However, we want our coordinate

0 commit comments

Comments
 (0)