mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
There was actually a test that ensured that raising an exception A
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?)
This commit is contained in:
parent
a008fa52be
commit
ae631f7f45
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue