]> granicus.if.org Git - python/commitdiff
There was actually a test that ensured that raising an exception A
authorGuido van Rossum <guido@python.org>
Wed, 1 Oct 1997 04:41:05 +0000 (04:41 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 1 Oct 1997 04:41:05 +0000 (04:41 +0000)
with an instance of a derived class B would really raise an A, not a
B.  Since Barry fixed this anomalous behaviour, I though I might as
well fix the test!  (Hmm, Barry, did you not run the tests or did you
miss that test_opcodes failed?)

Lib/test/test_opcodes.py

index 107b697dd5c4f352c286949cc5e92948cab754d5..15c9dda5cb796bda3e00dba5d2e52d2b93f6ce9f 100644 (file)
@@ -49,10 +49,9 @@ a = AClass()
 b = BClass()
 
 try: raise AClass, b
-except BClass, v: raise TestFailed
-except AClass, v:
+except BClass, v:
        if v != b: raise TestFailed
-
+else: raise TestFailed
 
 try: raise b
 except AClass, v: