|
3 | 3 | from matplotlib import rcParams
|
4 | 4 | from matplotlib import pyplot as plt
|
5 | 5 | from matplotlib.testing.decorators import image_comparison, knownfailureif, cleanup
|
6 |
| - |
7 |
| -@image_comparison(baseline_images=['pdf_use14corefonts'], extensions=['pdf']) |
8 |
| -def test_use14corefonts(): |
9 |
| - rcParams['pdf.use14corefonts'] = True |
10 |
| - rcParams['font.family'] = 'sans-serif' |
11 |
| - rcParams['font.size'] = 8 |
12 |
| - rcParams['font.sans-serif'] = ['Helvetica'] |
13 |
| - |
14 |
| - title = u'Test PDF backend with option use14corefonts=True' |
15 |
| - |
16 |
| - text = u'''A three-line text positioned just above a blue line |
17 |
| - and containing some French characters and the euro symbol: |
18 |
| - "Merci pépé pour les 10 €"''' |
19 |
| - |
20 |
| - plt.figure() |
21 |
| - plt.title(title) |
22 |
| - plt.text(0.5, 0.5, text, horizontalalignment='center', |
23 |
| - verticalalignment='bottom', |
24 |
| - fontsize=24) |
25 |
| - plt.axhline(0.5, linewidth=0.5) |
| 6 | +import os |
| 7 | + |
| 8 | +if 'TRAVIS' not in os.environ: |
| 9 | + @image_comparison(baseline_images=['pdf_use14corefonts'], extensions=['pdf']) |
| 10 | + def test_use14corefonts(): |
| 11 | + rcParams['pdf.use14corefonts'] = True |
| 12 | + rcParams['font.family'] = 'sans-serif' |
| 13 | + rcParams['font.size'] = 8 |
| 14 | + rcParams['font.sans-serif'] = ['Helvetica'] |
| 15 | + |
| 16 | + title = u'Test PDF backend with option use14corefonts=True' |
| 17 | + |
| 18 | + text = u'''A three-line text positioned just above a blue line |
| 19 | + and containing some French characters and the euro symbol: |
| 20 | + "Merci pépé pour les 10 €"''' |
| 21 | + |
| 22 | + plt.figure() |
| 23 | + plt.title(title) |
| 24 | + plt.text(0.5, 0.5, text, horizontalalignment='center', |
| 25 | + verticalalignment='bottom', |
| 26 | + fontsize=24) |
| 27 | + plt.axhline(0.5, linewidth=0.5) |
26 | 28 |
|
27 | 29 | @cleanup
|
28 | 30 | def test_type42():
|
|
0 commit comments