Bypass Python tests throwing base classes as exceptions for -builtin

Throwing builtin classes as exceptions is not supported
This commit is contained in:
William S Fulton 2014-10-02 20:03:40 +01:00
commit bbad7f96ab
9 changed files with 65 additions and 30 deletions

View file

@ -20,15 +20,16 @@ except RuntimeError,e:
# This is expected fail with -builtin option
# Throwing builtin classes as exceptions not supported
try:
t.hosed()
except threads_exception.Exc,e:
code = e.code
if code != 42:
raise RuntimeError, "bad... code: %d" % code
msg = e.msg
if msg != "Hosed":
raise RuntimeError, "bad... msg: '%s' len: %d" % (msg, len(msg))
if not threads_exception.is_python_builtin():
try:
t.hosed()
except threads_exception.Exc,e:
code = e.code
if code != 42:
raise RuntimeError, "bad... code: %d" % code
msg = e.msg
if msg != "Hosed":
raise RuntimeError, "bad... msg: '%s' len: %d" % (msg, len(msg))
for i in range(1,4):
try: