7
7
import matplotlib
8
8
import matplotlib .ft2font
9
9
from packaging .version import Version
10
+ import pytest
10
11
11
12
from .helpers import assert_existence , diff_summary , patch_summary
12
13
@@ -113,19 +114,23 @@ def test_default(tmp_path):
113
114
run_subtest ('test_default' , tmp_path , [])
114
115
115
116
117
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
116
118
def test_hash (tmp_path ):
117
119
run_subtest ('test_hash' , tmp_path , [HASH_LIBRARY_FLAG ])
118
120
119
121
122
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
120
123
def test_hybrid (tmp_path ):
121
124
run_subtest ('test_hybrid' , tmp_path , [HASH_LIBRARY_FLAG , BASELINE_IMAGES_FLAG ])
122
125
123
126
127
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
124
128
def test_results_always (tmp_path ):
125
129
run_subtest ('test_results_always' , tmp_path ,
126
130
[HASH_LIBRARY_FLAG , BASELINE_IMAGES_FLAG , '--mpl-results-always' ])
127
131
128
132
133
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
129
134
def test_html (tmp_path ):
130
135
run_subtest ('test_results_always' , tmp_path ,
131
136
[HASH_LIBRARY_FLAG , BASELINE_IMAGES_FLAG ], summaries = ['html' ])
@@ -134,6 +139,7 @@ def test_html(tmp_path):
134
139
assert (tmp_path / 'results' / 'styles.css' ).exists ()
135
140
136
141
142
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
137
143
def test_html_hashes_only (tmp_path ):
138
144
run_subtest ('test_html_hashes_only' , tmp_path , [HASH_LIBRARY_FLAG ], summaries = ['html' ])
139
145
assert (tmp_path / 'results' / 'fig_comparison.html' ).exists ()
@@ -148,6 +154,7 @@ def test_html_images_only(tmp_path):
148
154
assert (tmp_path / 'results' / 'styles.css' ).exists ()
149
155
150
156
157
+ @pytest .mark .skipif (not HASH_LIBRARY .exists (), reason = "No hash library for this mpl version" )
151
158
def test_basic_html (tmp_path ):
152
159
run_subtest ('test_results_always' , tmp_path ,
153
160
[HASH_LIBRARY_FLAG , BASELINE_IMAGES_FLAG ], summaries = ['basic-html' ])
0 commit comments