From: Stefan Behnel Date: Tue, 30 Dec 2008 12:45:14 +0000 (+0100) Subject: Py3 test case fix X-Git-Tag: 0.11-beta~50 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d7e5c0fb31afc521d627ee060441036433780252;p=cython.git Py3 test case fix --- diff --git a/tests/run/charescape.pyx b/tests/run/charescape.pyx index 953d5280..7165b41d 100644 --- a/tests/run/charescape.pyx +++ b/tests/run/charescape.pyx @@ -1,6 +1,13 @@ -__doc__ = u""" +import sys +if sys.version_info[0] < 3: + __doc__ = u""" >>> s = test() ->>> assert s == ''.join([chr(i) for i in range(1,49)]), repr(s) +>>> assert s == ''.join(map(chr, range(1,49))), repr(s) +""" +else: + __doc__ = u""" +>>> s = test() +>>> assert s == bytes(range(1,49)), repr(s) """ def test():