fix error on safeencode on PY3

This commit is contained in:
Prodesire 2017-11-18 11:22:33 +08:00
parent 6ad8cfce7e
commit 8691d4ad9b
1 changed files with 3 additions and 3 deletions

View File

@ -3,9 +3,9 @@ from pydu.string import safeencode, safeunicode, strips, lstrips, rstrips
def test_safeencode():
assert safeencode('hello') == 'hello'
assert safeencode(1) == '1'
assert safeencode(u'中文') == '中文'
assert safeencode('hello') == b'hello'
assert safeencode(1) == b'1'
assert safeencode(u'中文') == b'\xe4\xb8\xad\xe6\x96\x87'
def test_safeunicode():