diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-04 20:31:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-04 20:31:32 (GMT) |
commit | 5c1ee17742f21cd819519c4835eb6a958902cdb0 (patch) | |
tree | c9a40ff854bb16a300f9790c3659584949ed4f29 /Lib/test | |
parent | a04c3d86ae4a31aa17ebca2ec12bbd1066771b88 (diff) | |
download | cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.zip cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.tar.gz cpython-5c1ee17742f21cd819519c4835eb6a958902cdb0.tar.bz2 |
Change the unicode.translate docstring to document that
Unicode strings (with arbitrary length) are allowed
as entries in the unicode.translate mapping.
Add a test case for multicharacter replacements.
(Multicharacter replacements were enabled by the
PEP 293 patch)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_unicode.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 9e36316..7f70412 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -405,6 +405,8 @@ test('splitlines', u"\nabc\ndef\r\nghi\n\r", [u'\n', u'abc\n', u'def\r\n', u'ghi test('translate', u"abababc", u'bbbc', {ord('a'):None}) test('translate', u"abababc", u'iiic', {ord('a'):None, ord('b'):ord('i')}) test('translate', u"abababc", u'iiix', {ord('a'):None, ord('b'):ord('i'), ord('c'):u'x'}) +test('translate', u"abababc", u'<i><i><i>c', {ord('a'):None, ord('b'):u'<i>'}) +test('translate', u"abababc", u'c', {ord('a'):None, ord('b'):u''}) # Contains: print 'Testing Unicode contains method...', |