mirror of https://github.com/flaggo/pydu.git
fix error on safeencode on PY3
This commit is contained in:
parent
6ad8cfce7e
commit
8691d4ad9b
|
@ -3,9 +3,9 @@ from pydu.string import safeencode, safeunicode, strips, lstrips, rstrips
|
||||||
|
|
||||||
|
|
||||||
def test_safeencode():
|
def test_safeencode():
|
||||||
assert safeencode('hello') == 'hello'
|
assert safeencode('hello') == b'hello'
|
||||||
assert safeencode(1) == '1'
|
assert safeencode(1) == b'1'
|
||||||
assert safeencode(u'中文') == '中文'
|
assert safeencode(u'中文') == b'\xe4\xb8\xad\xe6\x96\x87'
|
||||||
|
|
||||||
|
|
||||||
def test_safeunicode():
|
def test_safeunicode():
|
||||||
|
|
Loading…
Reference in New Issue