Skip to content

Commit

Permalink
tests: Fix few test for proper "skipped" detection with qemu-arm's ti…
Browse files Browse the repository at this point in the history
…nytest.

"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).
  • Loading branch information
Paul Sokolovsky committed Dec 12, 2017
1 parent e4e3f0d commit da34b6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/basics/builtin_compile.py
Expand Up @@ -46,3 +46,4 @@ def test():
test()
else:
print("SKIP")
raise SystemExit
8 changes: 4 additions & 4 deletions tests/basics/class_descriptor.py
Expand Up @@ -27,8 +27,8 @@ class Main:
r = m.Forward
if 'Descriptor' in repr(r.__class__):
print('SKIP')
else:
print(r)
m.Forward = 'a'
del m.Forward
raise SystemExit

print(r)
m.Forward = 'a'
del m.Forward
1 change: 1 addition & 0 deletions tests/basics/fun_name.py
Expand Up @@ -14,3 +14,4 @@ def Fun(self):
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit

0 comments on commit da34b6e

Please sign in to comment.