summaryrefslogtreecommitdiff
path: root/Lib/test/test_opcodes.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-08-22 21:28:05 +0000
committerBarry Warsaw <barry@python.org>1997-08-22 21:28:05 +0000
commit8443ac3f2b634bd24b17effb6493074ce724921f (patch)
tree9bcda447d7eeeac92969c20bf85338a48570f097 /Lib/test/test_opcodes.py
parent05c24357b7e3869b16df12f26ab17f86fe675c7a (diff)
downloadcpython-8443ac3f2b634bd24b17effb6493074ce724921f.tar.gz
Added a few more tests of exception class raising
Diffstat (limited to 'Lib/test/test_opcodes.py')
-rw-r--r--Lib/test/test_opcodes.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_opcodes.py b/Lib/test/test_opcodes.py
index 656e00af24..107b697dd5 100644
--- a/Lib/test/test_opcodes.py
+++ b/Lib/test/test_opcodes.py
@@ -28,6 +28,9 @@ print '2.2 raise class exceptions'
class AClass: pass
class BClass(AClass): pass
class CClass: pass
+class DClass(AClass):
+ def __init__(self, ignore):
+ pass
try: raise AClass()
except: pass
@@ -55,9 +58,14 @@ try: raise b
except AClass, v:
if v != b: raise TestFailed
+# not enough arguments
try: raise BClass, a
except TypeError: pass
+try: raise DClass, a
+except DClass, v:
+ if not isinstance(v, DClass):
+ raise TestFailed
print '2.3 comparing function objects'