From: Walter Dörwald Date: Wed, 26 Mar 2003 14:31:25 +0000 (+0000) Subject: Add two tests for simple error cases. X-Git-Tag: v2.3c1~1365 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97951de77c7a1f08207f9929f950da268c6bb9b3;p=thirdparty%2FPython%2Fcpython.git Add two tests for simple error cases. --- diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index f668d31fa474..4bcd121a5dfc 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) +