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 2509030

Browse filesBrowse files
committed
TST: update test images
- update to mpl20 style - re-generate as needed - bump threshold on pngsuite test
1 parent 63da377 commit 2509030
Copy full SHA for 2509030
Expand file treeCollapse file tree

39 files changed

+2161
-2530
lines changed
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_axes/imshow.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_axes/imshow.svg
+56-116Lines changed: 56 additions & 116 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.svg
+407-471Lines changed: 407 additions & 471 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/bbox_image_inverted.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/bbox_image_inverted.svg
+60-130Lines changed: 60 additions & 130 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/image_clip.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/image_clip.svg
+254-135Lines changed: 254 additions & 135 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/image_cliprect.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/image_cliprect.svg
+76-142Lines changed: 76 additions & 142 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/image_composite_background.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/image_composite_background.svg
+66-151Lines changed: 66 additions & 151 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/image_interps.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/image_interps.svg
+446-462Lines changed: 446 additions & 462 deletions
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_image/imshow.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/imshow.svg
+64-144Lines changed: 64 additions & 144 deletions
Loading
Loading
Binary file not shown.

‎lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_image/rasterize_10dpi.svg
+26-26Lines changed: 26 additions & 26 deletions
Loading
Loading
Binary file not shown.
Loading

‎lib/matplotlib/tests/baseline_images/test_patheffects/patheffect2.svg

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/baseline_images/test_patheffects/patheffect2.svg
+677-737Lines changed: 677 additions & 737 deletions
Loading
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ def test_nonfinite_limits():
833833

834834

835835
@image_comparison(baseline_images=['imshow', 'imshow'],
836-
remove_text=True)
836+
remove_text=True, style='mpl20')
837837
def test_imshow():
838838
# Create a NxN image
839839
N = 100
@@ -855,7 +855,7 @@ def test_imshow():
855855
ax.imshow("r", data=data)
856856

857857

858-
@image_comparison(baseline_images=['imshow_clip'])
858+
@image_comparison(baseline_images=['imshow_clip'], style='mpl20')
859859
def test_imshow_clip():
860860
# As originally reported by Gellule Xg <gellule.xg@free.fr>
861861

‎lib/matplotlib/tests/test_image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_image.py
+20-10Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
needs_pillow = pytest.mark.xfail(not HAS_PIL, reason='Test requires Pillow')
3535

3636

37-
@image_comparison(baseline_images=['image_interps'])
37+
@image_comparison(baseline_images=['image_interps'], style='mpl20')
3838
def test_image_interps():
3939
'make the basic nearest, bilinear and bicubic interps'
4040
X = np.arange(100)
@@ -248,7 +248,7 @@ def test_cursor_data():
248248
assert z is None, "Did not get None, got %d" % z
249249

250250

251-
@image_comparison(baseline_images=['image_clip'])
251+
@image_comparison(baseline_images=['image_clip'], style='mpl20')
252252
def test_image_clip():
253253
d = [[1, 2], [3, 4]]
254254

@@ -258,7 +258,7 @@ def test_image_clip():
258258
im.set_clip_path(patch)
259259

260260

261-
@image_comparison(baseline_images=['image_cliprect'])
261+
@image_comparison(baseline_images=['image_cliprect'], style='mpl20')
262262
def test_image_cliprect():
263263
import matplotlib.patches as patches
264264

@@ -271,7 +271,8 @@ def test_image_cliprect():
271271
rect = patches.Rectangle(xy=(1,1), width=2, height=2, transform=im.axes.transData)
272272
im.set_clip_path(rect)
273273

274-
@image_comparison(baseline_images=['imshow'], remove_text=True)
274+
275+
@image_comparison(baseline_images=['imshow'], remove_text=True, style='mpl20')
275276
def test_imshow():
276277
import numpy as np
277278
import matplotlib.pyplot as plt
@@ -334,7 +335,10 @@ def test_image_edges():
334335

335336
assert g != 100, 'Expected a non-green edge - but sadly, it was.'
336337

337-
@image_comparison(baseline_images=['image_composite_background'], remove_text=True)
338+
339+
@image_comparison(baseline_images=['image_composite_background'],
340+
remove_text=True,
341+
style='mpl20')
338342
def test_image_composite_background():
339343
fig = plt.figure()
340344
ax = fig.add_subplot(111)
@@ -344,7 +348,9 @@ def test_image_composite_background():
344348
ax.set_facecolor((1, 0, 0, 0.5))
345349
ax.set_xlim([0, 12])
346350

347-
@image_comparison(baseline_images=['image_composite_alpha'], remove_text=True)
351+
352+
@image_comparison(baseline_images=['image_composite_alpha'],
353+
remove_text=True)
348354
def test_image_composite_alpha():
349355
"""
350356
Tests that the alpha value is recognized and correctly applied in the
@@ -370,7 +376,9 @@ def test_image_composite_alpha():
370376
ax.set_ylim([5, 0])
371377

372378

373-
@image_comparison(baseline_images=['rasterize_10dpi'], extensions=['pdf','svg'], remove_text=True)
379+
@image_comparison(baseline_images=['rasterize_10dpi'],
380+
extensions=['pdf', 'svg'],
381+
remove_text=True, style='mpl20')
374382
def test_rasterize_dpi():
375383
# This test should check rasterized rendering with high output resolution.
376384
# It plots a rasterized line and a normal image with implot. So it will catch
@@ -403,7 +411,8 @@ def test_rasterize_dpi():
403411
rcParams['savefig.dpi'] = 10
404412

405413

406-
@image_comparison(baseline_images=['bbox_image_inverted'], remove_text=True)
414+
@image_comparison(baseline_images=['bbox_image_inverted'], remove_text=True,
415+
style='mpl20')
407416
def test_bbox_image_inverted():
408417
# This is just used to produce an image to feed to BboxImage
409418
image = np.arange(100).reshape((10, 10))
@@ -449,7 +458,8 @@ def test_get_window_extent_for_AxisImage():
449458

450459
@image_comparison(baseline_images=['zoom_and_clip_upper_origin'],
451460
remove_text=True,
452-
extensions=['png'])
461+
extensions=['png'],
462+
style='mpl20')
453463
def test_zoom_and_clip_upper_origin():
454464
image = np.arange(100)
455465
image = image.reshape((10, 10))
@@ -727,7 +737,7 @@ def test_imshow_endianess():
727737

728738

729739
@image_comparison(baseline_images=['imshow_masked_interpolation'],
730-
remove_text=True, style='default')
740+
remove_text=True, style='mpl20')
731741
def test_imshow_masked_interpolation():
732742

733743
cm = copy(plt.get_cmap('viridis'))

‎lib/matplotlib/tests/test_patheffects.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_patheffects.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def test_patheffect1():
2727
ax1.grid(True, linestyle="-", path_effects=pe)
2828

2929

30-
@image_comparison(baseline_images=['patheffect2'], remove_text=True)
30+
@image_comparison(baseline_images=['patheffect2'], remove_text=True,
31+
style='mpl20')
3132
def test_patheffect2():
3233

3334
ax2 = plt.subplot(111)

‎lib/matplotlib/tests/test_pickle.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_pickle.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def test_simple():
4242

4343

4444
@image_comparison(baseline_images=['multi_pickle'],
45-
extensions=['png'], remove_text=True)
45+
extensions=['png'], remove_text=True,
46+
style='mpl20')
4647
def test_complete():
4748
fig = plt.figure('Figure with a label?', figsize=(10, 6))
4849

‎lib/matplotlib/tests/test_png.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_png.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@image_comparison(baseline_images=['pngsuite'], extensions=['png'],
20-
tol=0.02 if on_win else 0)
20+
tol=0.03)
2121
def test_pngsuite():
2222
dirname = os.path.join(
2323
os.path.dirname(__file__),
Loading

‎lib/mpl_toolkits/tests/test_axes_grid.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_axes_grid.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
@image_comparison(baseline_images=['imagegrid_cbar_mode'],
99
extensions=['png'],
10-
remove_text=True)
10+
remove_text=True,
11+
style='mpl20')
1112
def test_imagegrid_cbar_mode_edge():
1213
X, Y = np.meshgrid(np.linspace(0, 6, 30), np.linspace(0, 6, 30))
1314
arr = np.sin(X) * np.cos(Y) + 1j*(np.sin(3*Y) * np.cos(Y/2.))

0 commit comments

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