Skip to content

Commit 512f940

Browse files
committed
Remove non-needed remove_text=False.
That's already the default.
1 parent 4e20f15 commit 512f940

9 files changed

+20
-29
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,7 @@ def test_pcolormesh_alpha():
11821182
ax4.pcolormesh(Qx, Qy, Z, cmap=cmap, shading='gouraud', zorder=1)
11831183

11841184

1185-
@image_comparison(['pcolormesh_datetime_axis.png'],
1186-
remove_text=False, style='mpl20')
1185+
@image_comparison(['pcolormesh_datetime_axis.png'], style='mpl20')
11871186
def test_pcolormesh_datetime_axis():
11881187
# Remove this line when this test image is regenerated.
11891188
plt.rcParams['pcolormesh.snap'] = False
@@ -1211,8 +1210,7 @@ def test_pcolormesh_datetime_axis():
12111210
label.set_rotation(30)
12121211

12131212

1214-
@image_comparison(['pcolor_datetime_axis.png'],
1215-
remove_text=False, style='mpl20')
1213+
@image_comparison(['pcolor_datetime_axis.png'], style='mpl20')
12161214
def test_pcolor_datetime_axis():
12171215
fig = plt.figure()
12181216
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

lib/matplotlib/tests/test_bbox_tight.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_bbox_inches_tight():
4343

4444

4545
@image_comparison(['bbox_inches_tight_suptile_legend'],
46-
remove_text=False, savefig_kwarg={'bbox_inches': 'tight'})
46+
savefig_kwarg={'bbox_inches': 'tight'})
4747
def test_bbox_inches_tight_suptile_legend():
4848
plt.plot(np.arange(10), label='a straight line')
4949
plt.legend(bbox_to_anchor=(0.9, 1), loc='upper left')
@@ -62,7 +62,7 @@ def y_formatter(y, pos):
6262

6363

6464
@image_comparison(['bbox_inches_tight_suptile_non_default.png'],
65-
remove_text=False, savefig_kwarg={'bbox_inches': 'tight'},
65+
savefig_kwarg={'bbox_inches': 'tight'},
6666
tol=0.1) # large tolerance because only testing clipping.
6767
def test_bbox_inches_tight_suptitle_non_default():
6868
fig, ax = plt.subplots()

lib/matplotlib/tests/test_colorbar.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,7 @@ def test_negative_boundarynorm():
948948
np.testing.assert_allclose(cb.ax.get_yticks(), clevs)
949949

950950

951-
@image_comparison(['nonorm_colorbars.svg'], remove_text=False,
952-
style='mpl20')
951+
@image_comparison(['nonorm_colorbars.svg'], style='mpl20')
953952
def test_nonorm():
954953
plt.rcParams['svg.fonttype'] = 'none'
955954
data = [1, 2, 3, 4, 5]

lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ def test_colorbar_align():
465465
cbs[3].ax.get_position().y0)
466466

467467

468-
@image_comparison(['test_colorbars_no_overlapV.png'],
469-
remove_text=False, style='mpl20')
468+
@image_comparison(['test_colorbars_no_overlapV.png'], style='mpl20')
470469
def test_colorbars_no_overlapV():
471470
fig = plt.figure(figsize=(2, 4), layout="constrained")
472471
axs = fig.subplots(2, 1, sharex=True, sharey=True)
@@ -478,8 +477,7 @@ def test_colorbars_no_overlapV():
478477
fig.suptitle("foo")
479478

480479

481-
@image_comparison(['test_colorbars_no_overlapH.png'],
482-
remove_text=False, style='mpl20')
480+
@image_comparison(['test_colorbars_no_overlapH.png'], style='mpl20')
483481
def test_colorbars_no_overlapH():
484482
fig = plt.figure(figsize=(4, 2), layout="constrained")
485483
fig.suptitle("foo")

lib/matplotlib/tests/test_contour.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ def test_given_colors_levels_and_extends():
153153
plt.colorbar(c, ax=ax)
154154

155155

156-
@image_comparison(['contour_datetime_axis.png'],
157-
remove_text=False, style='mpl20')
156+
@image_comparison(['contour_datetime_axis.png'], style='mpl20')
158157
def test_contour_datetime_axis():
159158
fig = plt.figure()
160159
fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

lib/matplotlib/tests/test_figure.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,8 +1110,7 @@ def test_reused_gridspec():
11101110

11111111

11121112
@image_comparison(['test_subfigure.png'], style='mpl20',
1113-
savefig_kwarg={'facecolor': 'teal'},
1114-
remove_text=False)
1113+
savefig_kwarg={'facecolor': 'teal'})
11151114
def test_subfigure():
11161115
np.random.seed(19680801)
11171116
fig = plt.figure(layout='constrained')
@@ -1143,8 +1142,7 @@ def test_subfigure_tightbbox():
11431142

11441143

11451144
@image_comparison(['test_subfigure_ss.png'], style='mpl20',
1146-
savefig_kwarg={'facecolor': 'teal'},
1147-
remove_text=False)
1145+
savefig_kwarg={'facecolor': 'teal'})
11481146
def test_subfigure_ss():
11491147
# test assigning the subfigure via subplotspec
11501148
np.random.seed(19680801)
@@ -1167,8 +1165,7 @@ def test_subfigure_ss():
11671165

11681166

11691167
@image_comparison(['test_subfigure_double.png'], style='mpl20',
1170-
savefig_kwarg={'facecolor': 'teal'},
1171-
remove_text=False)
1168+
savefig_kwarg={'facecolor': 'teal'})
11721169
def test_subfigure_double():
11731170
# test assigning the subfigure via subplotspec
11741171
np.random.seed(19680801)

lib/matplotlib/tests/test_subplots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_exceptions():
144144
plt.subplots(2, 2, sharey='blah')
145145

146146

147-
@image_comparison(['subplots_offset_text'], remove_text=False)
147+
@image_comparison(['subplots_offset_text'])
148148
def test_subplots_offsettext():
149149
x = np.arange(0, 1e10, 1e9)
150150
y = np.arange(0, 100, 10)+1e4

lib/matplotlib/tests/test_units.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def default_units(value, axis):
7878

7979
# Tests that the conversion machinery works properly for classes that
8080
# work as a facade over numpy arrays (like pint)
81-
@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
81+
@image_comparison(['plot_pint.png'], style='mpl20',
8282
tol=0 if platform.machine() == 'x86_64' else 0.01)
8383
def test_numpy_facade(quantity_converter):
8484
# use former defaults to match existing baseline image

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def test_surface3d_masked_strides():
496496
ax.view_init(60, -45, 0)
497497

498498

499-
@mpl3d_image_comparison(['text3d.png'], remove_text=False)
499+
@mpl3d_image_comparison(['text3d.png'])
500500
def test_text3d():
501501
fig = plt.figure()
502502
ax = fig.add_subplot(projection='3d')
@@ -815,7 +815,7 @@ def test_add_collection3d_zs_scalar():
815815
ax.set_zlim(0, 2)
816816

817817

818-
@mpl3d_image_comparison(['axes3d_labelpad.png'], remove_text=False)
818+
@mpl3d_image_comparison(['axes3d_labelpad.png'])
819819
def test_axes3d_labelpad():
820820
fig = plt.figure()
821821
ax = fig.add_axes(Axes3D(fig, auto_add_to_figure=False))
@@ -835,7 +835,7 @@ def test_axes3d_labelpad():
835835
tick.set_pad(tick.get_pad() - i * 5)
836836

837837

838-
@mpl3d_image_comparison(['axes3d_cla.png'], remove_text=False)
838+
@mpl3d_image_comparison(['axes3d_cla.png'])
839839
def test_axes3d_cla():
840840
# fixed in pull request 4553
841841
fig = plt.figure()
@@ -844,7 +844,7 @@ def test_axes3d_cla():
844844
ax.cla() # make sure the axis displayed is 3D (not 2D)
845845

846846

847-
@mpl3d_image_comparison(['axes3d_rotated.png'], remove_text=False)
847+
@mpl3d_image_comparison(['axes3d_rotated.png'])
848848
def test_axes3d_rotated():
849849
fig = plt.figure()
850850
ax = fig.add_subplot(1, 1, 1, projection='3d')
@@ -1054,14 +1054,14 @@ def test_axes3d_focal_length_checks():
10541054
ax.set_proj_type('ortho', focal_length=1)
10551055

10561056

1057-
@mpl3d_image_comparison(['axes3d_focal_length.png'], remove_text=False)
1057+
@mpl3d_image_comparison(['axes3d_focal_length.png'])
10581058
def test_axes3d_focal_length():
10591059
fig, axs = plt.subplots(1, 2, subplot_kw={'projection': '3d'})
10601060
axs[0].set_proj_type('persp', focal_length=np.inf)
10611061
axs[1].set_proj_type('persp', focal_length=0.15)
10621062

10631063

1064-
@mpl3d_image_comparison(['axes3d_ortho.png'], remove_text=False)
1064+
@mpl3d_image_comparison(['axes3d_ortho.png'])
10651065
def test_axes3d_ortho():
10661066
fig = plt.figure()
10671067
ax = fig.add_subplot(projection='3d')
@@ -1165,7 +1165,7 @@ def test_alpha(self):
11651165
assert voxels[coord], "faces returned for absent voxel"
11661166
assert isinstance(poly, art3d.Poly3DCollection)
11671167

1168-
@mpl3d_image_comparison(['voxels-xyz.png'], tol=0.01, remove_text=False)
1168+
@mpl3d_image_comparison(['voxels-xyz.png'], tol=0.01)
11691169
def test_xyz(self):
11701170
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
11711171

0 commit comments

Comments
 (0)