summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 180072c..4185b9b 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -169,12 +169,18 @@ def run_method_tests(test):
test('rstrip', ' hello ', ' hello', None)
test('strip', 'hello', 'hello', None)
- # strip/lstrip/rstrip with real arg
+ # strip/lstrip/rstrip with str arg
test('strip', 'xyzzyhelloxyzzy', 'hello', 'xyz')
test('lstrip', 'xyzzyhelloxyzzy', 'helloxyzzy', 'xyz')
test('rstrip', 'xyzzyhelloxyzzy', 'xyzzyhello', 'xyz')
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')
+
test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS')
test('translate', 'xyzabcdef', 'xyzxyz', transtable, 'def')