diff options
author | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:48:16 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-05-20 14:48:16 (GMT) |
commit | f2072771674dcb71b03bd49e4c387d7986b13ca5 (patch) | |
tree | 9f4295102dc82c69eaac572f5fb6b83d940f80fa /Lib/test | |
parent | 3704644acba4bce9aedfa9de169f632fe2a121ac (diff) | |
download | cpython-f2072771674dcb71b03bd49e4c387d7986b13ca5.zip cpython-f2072771674dcb71b03bd49e4c387d7986b13ca5.tar.gz cpython-f2072771674dcb71b03bd49e4c387d7986b13ca5.tar.bz2 |
More --disable-unicode stuff.
I'm getting better at vi!
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/string_tests.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 4185b9b..334a6b9 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -176,10 +176,15 @@ def run_method_tests(test): test('strip', 'hello', 'hello', 'xyz') # strip/lstrip/rstrip with unicode arg - test('strip', 'xyzzyhelloxyzzy', u'hello', u'xyz') - test('lstrip', 'xyzzyhelloxyzzy', u'helloxyzzy', u'xyz') - test('rstrip', 'xyzzyhelloxyzzy', u'xyzzyhello', u'xyz') - test('strip', 'hello', u'hello', u'xyz') + if have_unicode: + test('strip', 'xyzzyhelloxyzzy', + unicode('hello', 'ascii'), unicode('xyz', 'ascii')) + test('lstrip', 'xyzzyhelloxyzzy', + unicode('helloxyzzy', 'ascii'), unicode('xyz', 'ascii')) + test('rstrip', 'xyzzyhelloxyzzy', + unicode('xyzzyhello', 'ascii'), unicode('xyz', 'ascii')) + test('strip', 'hello', + unicode('hello', 'ascii'), unicode('xyz', 'ascii')) test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def') |