summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-19 22:06:24 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-19 22:06:24 (GMT)
commit75a902db7859a4751743e98530c5d96a672641be (patch)
treea730c966dcfc993a800078004aae3a6094a75a6a /Lib/test/string_tests.py
parent21431e85d505b9698c085c25cbf1b2997a352b85 (diff)
downloadcpython-75a902db7859a4751743e98530c5d96a672641be.zip
cpython-75a902db7859a4751743e98530c5d96a672641be.tar.gz
cpython-75a902db7859a4751743e98530c5d96a672641be.tar.bz2
Patch 1280, by Alexandre Vassalotti.
Make PyString's indexing and iteration return integers. (I changed a few of Alexandre's decisions -- GvR.)
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index cb8900d..9da062e 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))