Fix test on Python 3.

This commit is contained in:
Valentin Lorentz 2018-02-02 00:19:37 +01:00
parent 39dacf6e5b
commit 2472e857c7

View File

@ -185,11 +185,12 @@ class FunctionsTestCase(SupyTestCase):
self.assertEqual(''.join(r), s)
if sys.version_info[0] < 3:
chr = unichr
uchr = unichr
u = lambda s: s.decode('utf8')
else:
uchr = chr
u = lambda x: x
s = (u('').join([chr(0x1f527), chr(0x1f527), chr(0x1f527), u(' ')]) * 100)\
s = (u('').join([uchr(0x1f527), uchr(0x1f527), uchr(0x1f527), u(' ')]) * 100)\
[0:-1]
r = ircutils.wrap(s, 20)