From a5cb895783b93a0ef16bf0db13d879f2c6b36de0 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 25 Jan 2009 19:06:41 +0100 Subject: [PATCH] fix test case in Py<2.6 --- tests/run/charencoding.pyx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/run/charencoding.pyx b/tests/run/charencoding.pyx index aa8be91a..57c4caaf 100644 --- a/tests/run/charencoding.pyx +++ b/tests/run/charencoding.pyx @@ -3,7 +3,7 @@ import sys if sys.version_info[0] < 3: __doc__ = u""" ->>> expected = b''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)]) +>>> expected = ''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)]) >>> s = test_assign() >>> assert s == expected, repr(s) @@ -13,11 +13,13 @@ if sys.version_info[0] < 3: """ else: __doc__ = u""" +>>> expected = bytes(list(range(0x10,0xFF,0x11)) + [0xFF]) + >>> s = test_assign() ->>> assert s == bytes(list(range(0x10,0xFF,0x11)) + [0xFF]), repr(s) +>>> assert s == expected, repr(s) >>> s = test_array() ->>> assert s == bytes(list(range(0x10,0xFF,0x11)) + [0xFF]), repr(s) +>>> assert s == expected, repr(s) """ def test_assign(): -- 2.26.2