Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ac3300

Browse files
committed
TST: Restore broken test_use14corefonts
History: - c0fcab4 - disabled on travis - f4adec7 - commented out - ff227d3 - enabled, but chopped
1 parent 440adff commit 4ac3300

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed
Binary file not shown.

lib/matplotlib/tests/test_backend_pdf.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@
1515
from matplotlib.testing.decorators import (image_comparison, knownfailureif,
1616
cleanup)
1717

18-
if 'TRAVIS' not in os.environ:
19-
@image_comparison(baseline_images=['pdf_use14corefonts'],
20-
extensions=['pdf'])
21-
def test_use14corefonts():
22-
rcParams['pdf.use14corefonts'] = True
23-
rcParams['font.family'] = 'sans-serif'
24-
rcParams['font.size'] = 8
25-
rcParams['font.sans-serif'] = ['Helvetica']
26-
rcParams['pdf.compression'] = 0
27-
28-
text = '''A three-line text positioned just above a blue line
29-
and containing some French characters and the euro symbol:
30-
"Merci pépé pour les 10 €"'''
18+
19+
@image_comparison(baseline_images=['pdf_use14corefonts'],
20+
extensions=['pdf'])
21+
def test_use14corefonts():
22+
rcParams['pdf.use14corefonts'] = True
23+
rcParams['font.family'] = 'sans-serif'
24+
rcParams['font.size'] = 8
25+
rcParams['font.sans-serif'] = ['Helvetica']
26+
rcParams['pdf.compression'] = 0
27+
28+
text = '''A three-line text positioned just above a blue line
29+
and containing some French characters and the euro symbol:
30+
"Merci pépé pour les 10 €"'''
31+
32+
fig = plt.figure()
33+
ax = fig.add_subplot(1, 1, 1)
34+
ax.set_title('Test PDF backend with option use14corefonts=True')
35+
ax.text(0.5, 0.5, text, horizontalalignment='center',
36+
verticalalignment='bottom',
37+
fontsize=14)
38+
ax.axhline(0.5, linewidth=0.5)
3139

3240

3341
@cleanup

0 commit comments

Comments
 (0)