From 75a902db7859a4751743e98530c5d96a672641be Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 19 Oct 2007 22:06:24 +0000 Subject: Patch 1280, by Alexandre Vassalotti. Make PyString's indexing and iteration return integers. (I changed a few of Alexandre's decisions -- GvR.) --- Lib/test/string_tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/test/string_tests.py') diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index cb8900d03f3..9da062ea58b 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -558,6 +558,10 @@ class CommonTest(BaseTest): a = self.type2test('DNSSEC') b = self.type2test('') for c in a: + # Special case for the str8, since indexing returns a integer + # XXX Maybe it would be a good idea to seperate str8's tests... + if self.type2test == str8: + c = chr(c) b += c hash(b) self.assertEqual(hash(a), hash(b)) -- cgit v1.2.3