summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-12-12 20:03:19 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-12-12 20:03:19 (GMT)
commit00b6127097f10d7fb03ab5abcd213141b878a8fd (patch)
tree8bf715d0dc1d8c9c515629b90382bab2175374bf /Lib/test/string_tests.py
parent63b4dd33c99bcad84fb928f874c133968d784632 (diff)
downloadcpython-00b6127097f10d7fb03ab5abcd213141b878a8fd.zip
cpython-00b6127097f10d7fb03ab5abcd213141b878a8fd.tar.gz
cpython-00b6127097f10d7fb03ab5abcd213141b878a8fd.tar.bz2
Patch #650653: Raise always value error if the table is not 256 bytes long.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 3eb8785..b64917b 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -192,6 +192,8 @@ def run_method_tests(test):
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', '!', '')