From 8691d4ad9bc98c3cb814d8581a8d655c0988ee45 Mon Sep 17 00:00:00 2001 From: Prodesire Date: Sat, 18 Nov 2017 11:22:33 +0800 Subject: [PATCH] fix error on safeencode on PY3 --- tests/test_string.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_string.py b/tests/test_string.py index c32e569..38b81fe 100644 --- a/tests/test_string.py +++ b/tests/test_string.py @@ -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():