da34b6ef45
"Builtin" tinytest-based testsuite as employed by qemu-arm (and now generalized by me to be reusable for other targets) performs simplified detection of skipped tests, it treats as such tests which raised SystemExit (instead of checking got "SKIP" output). Consequently, each "SKIP" must be accompanied by SystemExit (and conversely, SystemExit should not be used if test is not skipped, which so far seems to be true).
18 lines
276 B
Python
18 lines
276 B
Python
def Fun():
|
|
pass
|
|
|
|
class A:
|
|
def __init__(self):
|
|
pass
|
|
def Fun(self):
|
|
pass
|
|
|
|
try:
|
|
print(Fun.__name__)
|
|
print(A.__init__.__name__)
|
|
print(A.Fun.__name__)
|
|
print(A().Fun.__name__)
|
|
except AttributeError:
|
|
print('SKIP')
|
|
raise SystemExit
|