Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4f559a9

Browse filesBrowse files
authored
Merge pull request #7094 from Kojoley/restore-test_use14corefonts
TST: Restore broken `test_use14corefonts`
2 parents ea81cbc + 4ac3300 commit 4f559a9
Copy full SHA for 4f559a9

File tree

Expand file treeCollapse file tree

2 files changed

+21
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+21
-13
lines changed
Binary file not shown.

‎lib/matplotlib/tests/test_backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_pdf.py
+21-13Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.