From d7e5c0fb31afc521d627ee060441036433780252 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 30 Dec 2008 13:45:14 +0100 Subject: [PATCH] Py3 test case fix --- tests/run/charescape.pyx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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(): -- 2.26.2