|
110 | 110 | r'$\left(X\right)_{a}^{b}$', # github issue 7615 |
111 | 111 | r'$\dfrac{\$100.00}{y}$', # github issue #1888 |
112 | 112 | ] |
| 113 | +# 'Lightweight' tests test only a single fontset (dejavusans, which is the |
| 114 | +# default) and only png outputs, in order to minimize the size of baseline |
| 115 | +# images. |
| 116 | +lightweight_math_tests = [ |
| 117 | +] |
113 | 118 |
|
114 | 119 | digits = "0123456789" |
115 | 120 | uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
@@ -186,6 +191,17 @@ def test_mathtext_rendering(baseline_images, fontset, index, text): |
186 | 191 | horizontalalignment='center', verticalalignment='center') |
187 | 192 |
|
188 | 193 |
|
| 194 | +@pytest.mark.parametrize('index, text', enumerate(lightweight_math_tests), |
| 195 | + ids=range(len(lightweight_math_tests))) |
| 196 | +@pytest.mark.parametrize('fontset', ['dejavusans']) |
| 197 | +@pytest.mark.parametrize('baseline_images', ['mathtext1'], indirect=True) |
| 198 | +@image_comparison(baseline_images=None, extensions=['png']) |
| 199 | +def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text): |
| 200 | + fig = plt.figure(figsize=(5.25, 0.75)) |
| 201 | + fig.text(0.5, 0.5, text, math_fontfamily=fontset, |
| 202 | + horizontalalignment='center', verticalalignment='center') |
| 203 | + |
| 204 | + |
189 | 205 | @pytest.mark.parametrize( |
190 | 206 | 'index, text', enumerate(font_tests), ids=range(len(font_tests))) |
191 | 207 | @pytest.mark.parametrize( |
|
0 commit comments