summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-05 12:26:27 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-05 12:26:27 (GMT)
commit67e83886d9143dec4476dc56d1206c55baa45850 (patch)
treee29e6125d5b6bd326aa2deafe115f4bf1f6edbc6 /Lib/test/string_tests.py
parentacaa5a16d6cd9a94e7e111761264eef14a033d2c (diff)
downloadcpython-67e83886d9143dec4476dc56d1206c55baa45850.zip
cpython-67e83886d9143dec4476dc56d1206c55baa45850.tar.gz
cpython-67e83886d9143dec4476dc56d1206c55baa45850.tar.bz2
test_unicode.py passes again 9except for problems
with the idna codec.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 116bcf0..f169fde 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -642,17 +642,6 @@ class CommonTest(BaseTest):
self.checkequal('xyzzyhello', 'xyzzyhelloxyzzy', 'rstrip', 'xyz')
self.checkequal('hello', 'hello', 'strip', 'xyz')
- # strip/lstrip/rstrip with unicode arg
- if test_support.have_unicode:
- self.checkequal(str('hello', 'ascii'), 'xyzzyhelloxyzzy',
- 'strip', str('xyz', 'ascii'))
- self.checkequal(str('helloxyzzy', 'ascii'), 'xyzzyhelloxyzzy',
- 'lstrip', str('xyz', 'ascii'))
- self.checkequal(str('xyzzyhello', 'ascii'), 'xyzzyhelloxyzzy',
- 'rstrip', str('xyz', 'ascii'))
- self.checkequal(str('hello', 'ascii'), 'hello',
- 'strip', str('xyz', 'ascii'))
-
self.checkraises(TypeError, 'hello', 'strip', 42, 42)
self.checkraises(TypeError, 'hello', 'lstrip', 42, 42)
self.checkraises(TypeError, 'hello', 'rstrip', 42, 42)
@@ -956,12 +945,8 @@ class MixinStrUnicodeUserStringTest:
self.checkequal('w x y z', ' ', 'join', Sequence())
self.checkequal('abc', 'a', 'join', ('abc',))
self.checkequal('z', 'a', 'join', UserList(['z']))
- if test_support.have_unicode:
- self.checkequal(str('a.b.c'), str('.'), 'join', ['a', 'b', 'c'])
- self.checkequal(str('a.b.c'), '.', 'join', [str('a'), 'b', 'c'])
- self.checkequal(str('a.b.c'), '.', 'join', ['a', str('b'), 'c'])
- self.checkequal(str('a.b.c'), '.', 'join', ['a', 'b', str('c')])
- self.checkraises(TypeError, '.', 'join', ['a', str('b'), 3])
+ self.checkequal('a.b.c', '.', 'join', ['a', 'b', 'c'])
+ self.checkraises(TypeError, '.', 'join', ['a', 'b', 3])
for i in [5, 25, 125]:
self.checkequal(((('a' * i) + '-') * i)[:-1], '-', 'join',
['a' * i] * i)