summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-08-22 21:28:05 (GMT)
committerBarry Warsaw <barry@python.org>1997-08-22 21:28:05 (GMT)
commit558f66ff53e913070ca518559420148d5a9a034b (patch)
tree36327de08845938787e4fa7235fb023306e51876 /Lib/test
parentac405ce3f9524fd50a06f23ff9d1cde9174d67e7 (diff)
downloadcpython-558f66ff53e913070ca518559420148d5a9a034b.zip
cpython-558f66ff53e913070ca518559420148d5a9a034b.tar.gz
cpython-558f66ff53e913070ca518559420148d5a9a034b.tar.bz2
Added a few more tests of exception class raising
Diffstat (limited to 'Lib/test')
-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 656e00a..107b697 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'