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 9278668

Browse filesBrowse files
authored
Merge pull request #19 from NelleV/tacaswell_fix_nonascii_afm
TST afm._to_str is now tested against utf8-encoded bytes
2 parents ce92859 + 343f5fc commit 9278668
Copy full SHA for 9278668

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+13
-0
lines changed

‎lib/matplotlib/tests/test_afm.py

Copy file name to clipboard
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import matplotlib.afm as afm
2+
import six
3+
4+
5+
def test_nonascii_str():
6+
# This tests that we also decode bytes as utf-8 properly.
7+
# Else, font files with non ascii caracters fail to load.
8+
9+
if six.PY3:
10+
string = "привет".encode("utf8")
11+
else:
12+
string = "привет"
13+
afm._to_str(string)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.