diff options
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 2f12e96..68a11fa 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -3355,31 +3355,6 @@ def docdescriptor(): vereq(NewClass.__doc__, 'object=None; type=NewClass') vereq(NewClass().__doc__, 'object=NewClass instance; type=NewClass') -def string_exceptions(): - if verbose: - print "Testing string exceptions ..." - - # Ensure builtin strings work OK as exceptions. - astring = "An exception string." - try: - raise astring - except astring: - pass - else: - raise TestFailed, "builtin string not usable as exception" - - # Ensure string subclass instances do not. - class MyStr(str): - pass - - newstring = MyStr("oops -- shouldn't work") - try: - raise newstring - except TypeError: - pass - except: - raise TestFailed, "string subclass allowed as exception" - def copy_setstate(): if verbose: print "Testing that copy.*copy() correctly uses __setstate__..." @@ -4172,7 +4147,6 @@ def test_main(): funnynew() imulbug() docdescriptor() - string_exceptions() copy_setstate() slices() subtype_resurrection() |