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

Skip to content

Commit 7cdab88

Browse files
committed
TST: tweak and whitelist test
1 parent 61758e3 commit 7cdab88

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,6 +1472,7 @@ def tk_window_focus():
14721472

14731473
default_test_modules = [
14741474
'matplotlib.tests.test_agg',
1475+
'matplotlib.tests.test_afm',
14751476
'matplotlib.tests.test_animation',
14761477
'matplotlib.tests.test_arrow_patches',
14771478
'matplotlib.tests.test_artist',

lib/matplotlib/tests/test_afm.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
def test_nonascii_str():
99
# This tests that we also decode bytes as utf-8 properly.
1010
# Else, font files with non ascii caracters fail to load.
11+
inp_str = "привет"
12+
byte_str = inp_str.encode("utf8")
1113

12-
if six.PY3:
13-
string = "привет".encode("utf8")
14-
else:
15-
string = "привет"
16-
afm._to_str(string)
14+
ret = afm._to_str(byte_str)
15+
assert ret == inp_str

0 commit comments

Comments
 (0)