summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-03-26 14:31:25 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-03-26 14:31:25 (GMT)
commit97951de77c7a1f08207f9929f950da268c6bb9b3 (patch)
tree1288983279ae291aa6cd7197f20485400e1fdd2a /Lib
parentf6f575ae6fc4b58f8735b6aebaa422d48bedcef4 (diff)
downloadcpython-97951de77c7a1f08207f9929f950da268c6bb9b3.zip
cpython-97951de77c7a1f08207f9929f950da268c6bb9b3.tar.gz
cpython-97951de77c7a1f08207f9929f950da268c6bb9b3.tar.bz2
Add two tests for simple error cases.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/string_tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index f668d31..4bcd121 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -628,3 +628,7 @@ class MixinStrUserStringTest:
data = 'x\x9c\xcbH\xcd\xc9\xc9W(\xcf/\xcaI\x01\x00\x1a\x0b\x04]'
self.checkequal(data, 'hello world', 'encode', 'zlib')
self.checkequal('hello world', data, 'decode', 'zlib')
+
+ self.checkraises(TypeError, 'xyz', 'decode', 42)
+ self.checkraises(TypeError, 'xyz', 'encode', 42)
+