Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitf0ec17d

Browse files
committed
TST: Increase tolerance on more arches
Not sure why this didn't hit Fedora when 3.10.0 was initially built, butit is now during the F42 Mass Rebuild.These tests are already covered by `arm64`-specific tolerances (akaApple Silicon), and while one or two won't need it, I've changed all ofthese.Additionally, instead of listing every single architecture, justincrease the tolerance on non-x86_64. Also, make a few tweaks toexisting conditions to make these all consistent.
1 parent29f3a5c commitf0ec17d

18 files changed

+51
-57
lines changed

‎lib/matplotlib/tests/test_arrow_patches.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def draw_arrow(ax, t, r):
1212

1313

1414
@image_comparison(['fancyarrow_test_image'],
15-
tol=0.012ifplatform.machine()=='arm64'else0)
15+
tol=0ifplatform.machine()=='x86_64'else0.012)
1616
deftest_fancyarrow():
1717
# Added 0 to test division by zero error described in issue 3930
1818
r= [0.4,0.3,0.2,0.1,0]
@@ -149,7 +149,7 @@ def test_arrow_styles():
149149

150150

151151
@image_comparison(['connection_styles.png'],style='mpl20',remove_text=True,
152-
tol=0.013ifplatform.machine()=='arm64'else0)
152+
tol=0ifplatform.machine()=='x86_64'else0.013)
153153
deftest_connection_styles():
154154
styles=mpatches.ConnectionStyle.get_styles()
155155

‎lib/matplotlib/tests/test_axes.py‎

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def test_matshow(fig_test, fig_ref):
243243
'formatter_ticker_004',
244244
'formatter_ticker_005',
245245
],
246-
tol=0.031ifplatform.machine()=='arm64'else0)
246+
tol=0ifplatform.machine()=='x86_64'else0.031)
247247
deftest_formatter_ticker():
248248
importmatplotlib.testing.jpl_unitsasunits
249249
units.register()
@@ -444,7 +444,7 @@ def test_twin_logscale(fig_test, fig_ref, twin):
444444

445445

446446
@image_comparison(['twin_autoscale.png'],
447-
tol=0.009ifplatform.machine()=='arm64'else0)
447+
tol=0ifplatform.machine()=='x86_64'else0.009)
448448
deftest_twinx_axis_scales():
449449
x=np.array([0,0.5,1])
450450
y=0.5*x
@@ -1218,9 +1218,8 @@ def test_imshow():
12181218
ax.imshow("r",data=data)
12191219

12201220

1221-
@image_comparison(
1222-
['imshow_clip'],style='mpl20',
1223-
tol=1.24ifplatform.machine()in ('aarch64','arm64','ppc64le','s390x')else0)
1221+
@image_comparison(['imshow_clip'],style='mpl20',
1222+
tol=0ifplatform.machine()=='x86_64'else1.24)
12241223
deftest_imshow_clip():
12251224
# As originally reported by Gellule Xg <gellule.xg@free.fr>
12261225
# use former defaults to match existing baseline image
@@ -1299,7 +1298,7 @@ def test_fill_betweenx_input(y, x1, x2):
12991298

13001299

13011300
@image_comparison(['fill_between_interpolate'],remove_text=True,
1302-
tol=0.012ifplatform.machine()=='arm64'else0)
1301+
tol=0ifplatform.machine()=='x86_64'else0.012)
13031302
deftest_fill_between_interpolate():
13041303
x=np.arange(0.0,2,0.02)
13051304
y1=np.sin(2*np.pi*x)
@@ -1728,7 +1727,8 @@ def test_pcolorauto(fig_test, fig_ref, snap):
17281727
ax.pcolormesh(x2,y2,Z,snap=snap)
17291728

17301729

1731-
@image_comparison(['canonical'],tol=0.02ifplatform.machine()=='arm64'else0)
1730+
@image_comparison(['canonical'],
1731+
tol=0ifplatform.machine()=='x86_64'else0.02)
17321732
deftest_canonical():
17331733
fig,ax=plt.subplots()
17341734
ax.plot([1,2,3])
@@ -2653,9 +2653,8 @@ def test_contour_hatching():
26532653
extend='both',alpha=0.5)
26542654

26552655

2656-
@image_comparison(
2657-
['contour_colorbar'],style='mpl20',
2658-
tol=0.54ifplatform.machine()in ('aarch64','arm64','ppc64le','s390x')else0)
2656+
@image_comparison(['contour_colorbar'],style='mpl20',
2657+
tol=0ifplatform.machine()=='x86_64'else0.54)
26592658
deftest_contour_colorbar():
26602659
x,y,z=contour_dat()
26612660

@@ -3233,7 +3232,7 @@ def test_log_scales_invalid():
32333232

32343233

32353234
@image_comparison(['stackplot_test_image','stackplot_test_image'],
3236-
tol=0.031ifplatform.machine()=='arm64'else0)
3235+
tol=0ifplatform.machine()=='x86_64'else0.031)
32373236
deftest_stackplot():
32383237
fig=plt.figure()
32393238
x=np.linspace(0,10,10)
@@ -5138,7 +5137,7 @@ def test_marker_styles():
51385137

51395138

51405139
@image_comparison(['rc_markerfill.png'],
5141-
tol=0.037ifplatform.machine()=='arm64'else0)
5140+
tol=0ifplatform.machine()=='x86_64'else0.037)
51425141
deftest_markers_fillstyle_rcparams():
51435142
fig,ax=plt.subplots()
51445143
x=np.arange(7)
@@ -5721,7 +5720,7 @@ def test_twin_remove(fig_test, fig_ref):
57215720

57225721

57235722
@image_comparison(['twin_spines.png'],remove_text=True,
5724-
tol=0.022ifplatform.machine()=='arm64'else0)
5723+
tol=0ifplatform.machine()=='x86_64'else0.022)
57255724
deftest_twin_spines():
57265725

57275726
defmake_patch_spines_invisible(ax):
@@ -6318,7 +6317,7 @@ def test_pie_hatch_multi(fig_test, fig_ref):
63186317

63196318

63206319
@image_comparison(['set_get_ticklabels.png'],
6321-
tol=0.025ifplatform.machine()=='arm64'else0)
6320+
tol=0ifplatform.machine()=='x86_64'else0.025)
63226321
deftest_set_get_ticklabels():
63236322
# test issue 2246
63246323
fig,ax=plt.subplots(2)
@@ -6911,7 +6910,7 @@ def test_loglog():
69116910

69126911

69136912
@image_comparison(["test_loglog_nonpos.png"],remove_text=True,style='mpl20',
6914-
tol=0.029ifplatform.machine()=='arm64'else0)
6913+
tol=0ifplatform.machine()=='x86_64'else0.029)
69156914
deftest_loglog_nonpos():
69166915
fig,axs=plt.subplots(3,3)
69176916
x=np.arange(1,11)
@@ -7880,7 +7879,7 @@ def test_scatter_empty_data():
78807879

78817880

78827881
@image_comparison(['annotate_across_transforms.png'],style='mpl20',remove_text=True,
7883-
tol=0.025ifplatform.machine()=='arm64'else0)
7882+
tol=0ifplatform.machine()=='x86_64'else0.025)
78847883
deftest_annotate_across_transforms():
78857884
x=np.linspace(0,10,200)
78867885
y=np.exp(-x)*np.sin(x)
@@ -7911,7 +7910,7 @@ def inverted(self):
79117910

79127911

79137912
@image_comparison(['secondary_xy.png'],style='mpl20',
7914-
tol=0.027ifplatform.machine()=='arm64'else0)
7913+
tol=0ifplatform.machine()=='x86_64'else0.027)
79157914
deftest_secondary_xy():
79167915
fig,axs=plt.subplots(1,2,figsize=(10,5),constrained_layout=True)
79177916

@@ -9174,10 +9173,8 @@ def test_zorder_and_explicit_rasterization():
91749173
fig.savefig(b,format='pdf')
91759174

91769175

9177-
@image_comparison(
9178-
["preset_clip_paths.png"],
9179-
remove_text=True,style="mpl20",
9180-
tol=0.027ifplatform.machine()in ("aarch64","arm64","ppc64le")else0)
9176+
@image_comparison(["preset_clip_paths.png"],remove_text=True,style="mpl20",
9177+
tol=0ifplatform.machine()=='x86_64'else0.027)
91819178
deftest_preset_clip_paths():
91829179
fig,ax=plt.subplots()
91839180

@@ -9511,7 +9508,7 @@ def test_boxplot_orientation(fig_test, fig_ref):
95119508

95129509

95139510
@image_comparison(["use_colorizer_keyword.png"],
9514-
tol=0.05ifplatform.machine()=='arm64'else0)
9511+
tol=0ifplatform.machine()=='x86_64'else0.05)
95159512
deftest_use_colorizer_keyword():
95169513
# test using the colorizer keyword
95179514
np.random.seed(0)

‎lib/matplotlib/tests/test_bbox_tight.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_bbox_inches_tight():
4646

4747
@image_comparison(['bbox_inches_tight_suptile_legend'],
4848
savefig_kwarg={'bbox_inches':'tight'},
49-
tol=0.02ifplatform.machine()=='arm64'else0)
49+
tol=0ifplatform.machine()=='x86_64'else0.02)
5050
deftest_bbox_inches_tight_suptile_legend():
5151
plt.plot(np.arange(10),label='a straight line')
5252
plt.legend(bbox_to_anchor=(0.9,1),loc='upper left')

‎lib/matplotlib/tests/test_collections.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def test_barb_limits():
391391

392392

393393
@image_comparison(['EllipseCollection_test_image.png'],remove_text=True,
394-
tol=0.021ifplatform.machine()=='arm64'else0)
394+
tol=0ifplatform.machine()=='x86_64'else0.021)
395395
deftest_EllipseCollection():
396396
# Test basic functionality
397397
fig,ax=plt.subplots()

‎lib/matplotlib/tests/test_constrainedlayout.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_constrained_layout9():
198198

199199

200200
@image_comparison(['constrained_layout10.png'],
201-
tol=0.032ifplatform.machine()=='arm64'else0)
201+
tol=0ifplatform.machine()=='x86_64'else0.032)
202202
deftest_constrained_layout10():
203203
"""Test for handling legend outside axis"""
204204
fig,axs=plt.subplots(2,2,layout="constrained")

‎lib/matplotlib/tests/test_contour.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_contour_label_with_disconnected_segments():
140140

141141

142142
@image_comparison(['contour_manual_colors_and_levels.png'],remove_text=True,
143-
tol=0.018ifplatform.machine()=='arm64'else0)
143+
tol=0ifplatform.machine()=='x86_64'else0.018)
144144
deftest_given_colors_levels_and_extends():
145145
# Remove this line when this test image is regenerated.
146146
plt.rcParams['pcolormesh.snap']=False
@@ -416,10 +416,8 @@ def test_contourf_log_extension():
416416
cb=plt.colorbar(c3,ax=ax3)
417417

418418

419-
@image_comparison(
420-
['contour_addlines.png'],remove_text=True,style='mpl20',
421-
tol=0.15ifplatform.machine()in ('aarch64','arm64','ppc64le','s390x')
422-
else0.03)
419+
@image_comparison(['contour_addlines.png'],remove_text=True,style='mpl20',
420+
tol=0.03ifplatform.machine()=='x86_64'else0.15)
423421
# tolerance is because image changed minutely when tick finding on
424422
# colorbars was cleaned up...
425423
deftest_contour_addlines():

‎lib/matplotlib/tests/test_figure.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def test_clf_keyword():
210210

211211

212212
@image_comparison(['figure_today'],
213-
tol=0.015ifplatform.machine()=='arm64'else0)
213+
tol=0ifplatform.machine()=='x86_64'else0.015)
214214
deftest_figure():
215215
# named figure support
216216
fig=plt.figure('today')

‎lib/matplotlib/tests/test_legend.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_various_labels():
140140

141141

142142
@image_comparison(['legend_labels_first.png'],remove_text=True,
143-
tol=0.013ifplatform.machine()=='arm64'else0)
143+
tol=0ifplatform.machine()=='x86_64'else0.013)
144144
deftest_labels_first():
145145
# test labels to left of markers
146146
fig,ax=plt.subplots()
@@ -151,7 +151,7 @@ def test_labels_first():
151151

152152

153153
@image_comparison(['legend_multiple_keys.png'],remove_text=True,
154-
tol=0.013ifplatform.machine()=='arm64'else0)
154+
tol=0ifplatform.machine()=='x86_64'else0.013)
155155
deftest_multiple_keys():
156156
# test legend entries with multiple keys
157157
fig,ax=plt.subplots()
@@ -514,7 +514,7 @@ def test_figure_legend_outside():
514514

515515

516516
@image_comparison(['legend_stackplot.png'],
517-
tol=0.031ifplatform.machine()=='arm64'else0)
517+
tol=0ifplatform.machine()=='x86_64'else0.031)
518518
deftest_legend_stackplot():
519519
"""Test legend for PolyCollection using stackplot."""
520520
# related to #1341, #1943, and PR #3303
@@ -650,7 +650,7 @@ def test_empty_bar_chart_with_legend():
650650

651651

652652
@image_comparison(['shadow_argument_types.png'],remove_text=True,style='mpl20',
653-
tol=0.028ifplatform.machine()=='arm64'else0)
653+
tol=0ifplatform.machine()=='x86_64'else0.028)
654654
deftest_shadow_argument_types():
655655
# Test that different arguments for shadow work as expected
656656
fig,ax=plt.subplots()

‎lib/matplotlib/tests/test_lines.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_valid_linestyles():
140140

141141

142142
@image_comparison(['drawstyle_variants.png'],remove_text=True,
143-
tol=0.03ifplatform.machine()=='arm64'else0)
143+
tol=0ifplatform.machine()=='x86_64'else0.03)
144144
deftest_drawstyle_variants():
145145
fig,axs=plt.subplots(6)
146146
dss= ["default","steps-mid","steps-pre","steps-post","steps",None]
@@ -183,9 +183,8 @@ def test_set_drawstyle():
183183
assertlen(line.get_path().vertices)==len(x)
184184

185185

186-
@image_comparison(
187-
['line_collection_dashes'],remove_text=True,style='mpl20',
188-
tol=0ifplatform.machine()=='x86_64'else0.65)
186+
@image_comparison(['line_collection_dashes'],remove_text=True,style='mpl20',
187+
tol=0ifplatform.machine()=='x86_64'else0.65)
189188
deftest_set_line_coll_dash_image():
190189
fig,ax=plt.subplots()
191190
np.random.seed(0)

‎lib/matplotlib/tests/test_patches.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def test_wedge_movement():
438438

439439

440440
@image_comparison(['wedge_range'],remove_text=True,
441-
tol=0.009ifplatform.machine()=='arm64'else0)
441+
tol=0ifplatform.machine()=='x86_64'else0.009)
442442
deftest_wedge_range():
443443
ax=plt.axes()
444444

@@ -564,7 +564,7 @@ def test_units_rectangle():
564564

565565

566566
@image_comparison(['connection_patch.png'],style='mpl20',remove_text=True,
567-
tol=0.024ifplatform.machine()=='arm64'else0)
567+
tol=0ifplatform.machine()=='x86_64'else0.024)
568568
deftest_connection_patch():
569569
fig, (ax1,ax2)=plt.subplots(1,2)
570570

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp