Commit 3cf7a9b8 authored by Stefan Behnel's avatar Stefan Behnel

merge 0.19.x branch into master

parents 4d5c1c4e 0c6fdf06
......@@ -20,6 +20,15 @@ def default():
"""
return u'abcdefg'.encode()
def encode_non_constant(encoding):
"""
>>> isinstance(encode_non_constant('utf8'), _bytes)
True
>>> encode_non_constant('utf8') == u.encode('UTF-8')
True
"""
return text.encode(encoding)
@cython.test_assert_path_exists('//PythonCapiFunctionNode[@cname = "PyUnicode_AsUTF8String"]')
def utf8():
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment