@@ -37,7 +37,7 @@ def glaciers():
37
37
)
38
38
39
39
40
- @image_comparison (baseline_images = ["col" ], extensions = ["png" ], style = [])
40
+ @image_comparison (baseline_images = ["col" ], extensions = ["png" ], style = [], tol = 0.01 )
41
41
def test_col (aggregated ):
42
42
f , ax = aggregated .v .sel (month = 1 ).xvec .plot (col = "level" )
43
43
@@ -48,7 +48,7 @@ def test_col(aggregated):
48
48
assert ax0 .get_title () == "level = 200"
49
49
50
50
51
- @image_comparison (baseline_images = ["colwrap" ], extensions = ["png" ], style = [])
51
+ @image_comparison (baseline_images = ["colwrap" ], extensions = ["png" ], style = [], tol = 0.01 )
52
52
def test_colwrap (aggregated ):
53
53
f , ax = aggregated .u .sel (month = 1 ).xvec .plot (col = "level" , col_wrap = 2 )
54
54
@@ -58,7 +58,7 @@ def test_colwrap(aggregated):
58
58
assert ax [0 ][0 ].get_title () == "level = 200"
59
59
60
60
61
- @image_comparison (baseline_images = ["col_row" ], extensions = ["png" ], style = [])
61
+ @image_comparison (baseline_images = ["col_row" ], extensions = ["png" ], style = [], tol = 0.01 )
62
62
def test_col_row (aggregated ):
63
63
f , ax = aggregated .v .xvec .plot (col = "month" , row = "level" )
64
64
@@ -70,15 +70,15 @@ def test_col_row(aggregated):
70
70
assert ax [0 ][1 ].get_ylabel () == "level = 200"
71
71
72
72
73
- @image_comparison (baseline_images = ["1d" ], extensions = ["png" ], style = [])
73
+ @image_comparison (baseline_images = ["1d" ], extensions = ["png" ], style = [], tol = 0.01 )
74
74
def test_1d (aggregated ):
75
75
f , ax = aggregated .z .sel (level = 200 , month = 1 ).xvec .plot ()
76
76
77
77
assert ax .get_xlabel () == "Geodetic longitude\n [degree]"
78
78
assert ax .get_ylabel () == "Geodetic latitude\n [degree]"
79
79
80
80
81
- @image_comparison (baseline_images = ["var_geom" ], extensions = ["png" ], style = [])
81
+ @image_comparison (baseline_images = ["var_geom" ], extensions = ["png" ], style = [], tol = 0.01 )
82
82
def test_var_geom (glaciers ):
83
83
f , ax = glaciers .geometry .xvec .plot (col = "year" )
84
84
@@ -89,7 +89,9 @@ def test_var_geom(glaciers):
89
89
assert ax0 .get_title () == "year = 1936.0"
90
90
91
91
92
- @image_comparison (baseline_images = ["var_geom_facet" ], extensions = ["png" ], style = [])
92
+ @image_comparison (
93
+ baseline_images = ["var_geom_facet" ], extensions = ["png" ], style = [], tol = 0.01
94
+ )
93
95
def test_var_geom_facet (glaciers ):
94
96
f , ax = glaciers .geometry .xvec .plot (col = "name" , row = "year" )
95
97
@@ -100,7 +102,9 @@ def test_var_geom_facet(glaciers):
100
102
assert ax [0 ][- 1 ].get_ylabel () == "year = 1936.0"
101
103
102
104
103
- @image_comparison (baseline_images = ["var_geom_ds" ], extensions = ["png" ], style = [])
105
+ @image_comparison (
106
+ baseline_images = ["var_geom_ds" ], extensions = ["png" ], style = [], tol = 0.01
107
+ )
104
108
def test_var_geom_ds (glaciers ):
105
109
f , ax = glaciers .xvec .plot (col = "year" , geometry = "geometry" )
106
110
@@ -111,7 +115,7 @@ def test_var_geom_ds(glaciers):
111
115
assert ax0 .get_title () == "year = 1936.0"
112
116
113
117
114
- @image_comparison (baseline_images = ["hue" ], extensions = ["png" ], style = [])
118
+ @image_comparison (baseline_images = ["hue" ], extensions = ["png" ], style = [], tol = 0.01 )
115
119
def test_hue (glaciers ):
116
120
f , ax = glaciers .xvec .plot (col = "year" , geometry = "geometry" , hue = "fwidth" )
117
121
@@ -122,7 +126,9 @@ def test_hue(glaciers):
122
126
assert ax0 .get_title () == "year = 1936.0"
123
127
124
128
125
- @image_comparison (baseline_images = ["geom_switching" ], extensions = ["png" ], style = [])
129
+ @image_comparison (
130
+ baseline_images = ["geom_switching" ], extensions = ["png" ], style = [], tol = 0.01
131
+ )
126
132
def test_geom_switching (glaciers ):
127
133
glaciers_w_sum = glaciers .xvec .summarize_geometry (
128
134
dim = "name" , geom_array = "geometry" , aggfunc = "concave_hull" , ratio = 0.25
0 commit comments