Mercurial > cpython-lru_cache-weakref
diff Lib/test/string_tests.py @ 26625:ba1578be5706 legacy-trunk
Patch #650653: Raise always value error if the table is not 256 bytes long.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 12 Dec 2002 20:03:19 +0000 |
| parents | d66129b551db |
| children | fe10ece8ba68 |
line wrap: on
line diff
--- a/Lib/test/string_tests.py Thu Dec 12 19:35:00 2002 +0000 +++ b/Lib/test/string_tests.py Thu Dec 12 20:03:19 2002 +0000 @@ -192,6 +192,8 @@ table = string.maketrans('a', 'A') test('translate', 'abc', 'Abc', table) test('translate', 'xyz', 'xyz', table) + test('translate', 'xyz', ValueError, 'too short', 'strip') + test('translate', 'xyz', ValueError, 'too short') test('replace', 'one!two!three!', 'one@two!three!', '!', '@', 1) test('replace', 'one!two!three!', 'onetwothree', '!', '')
