From da34b6ef452514170e8ce1d1819070a920c2568e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 12 Dec 2017 01:20:11 +0200 Subject: [PATCH] tests: Fix few test for proper "skipped" detection with qemu-arm's tinytest. "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). --- tests/basics/builtin_compile.py | 1 + tests/basics/class_descriptor.py | 8 ++++---- tests/basics/fun_name.py | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/basics/builtin_compile.py b/tests/basics/builtin_compile.py index 32c6667d8b..bf272aca15 100644 --- a/tests/basics/builtin_compile.py +++ b/tests/basics/builtin_compile.py @@ -46,3 +46,4 @@ if have_compile(): test() else: print("SKIP") + raise SystemExit diff --git a/tests/basics/class_descriptor.py b/tests/basics/class_descriptor.py index eb88ba7b9c..54f386230f 100644 --- a/tests/basics/class_descriptor.py +++ b/tests/basics/class_descriptor.py @@ -27,8 +27,8 @@ except AttributeError: 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 diff --git a/tests/basics/fun_name.py b/tests/basics/fun_name.py index 7a84fc3390..a724f41118 100644 --- a/tests/basics/fun_name.py +++ b/tests/basics/fun_name.py @@ -14,3 +14,4 @@ try: print(A().Fun.__name__) except AttributeError: print('SKIP') + raise SystemExit