From a279c64046445c9dbde0a5d3d53d467cb7e43550 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 10 Aug 2025 12:06:16 +1000 Subject: [PATCH] tests: Add .native.exp output files for tests that differ with native. Signed-off-by: Damien George --- tests/basics/sys_tracebacklimit.py.native.exp | 22 +++++++++++++++++++ tests/micropython/emg_exc.py.native.exp | 2 ++ .../heapalloc_traceback.py.native.exp | 3 +++ tests/misc/print_exception.py.native.exp | 18 +++++++++++++++ tests/run-tests.py | 6 ----- tests/thread/thread_exc2.py.native.exp | 3 +++ 6 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 tests/basics/sys_tracebacklimit.py.native.exp create mode 100644 tests/micropython/emg_exc.py.native.exp create mode 100644 tests/micropython/heapalloc_traceback.py.native.exp create mode 100644 tests/misc/print_exception.py.native.exp create mode 100644 tests/thread/thread_exc2.py.native.exp diff --git a/tests/basics/sys_tracebacklimit.py.native.exp b/tests/basics/sys_tracebacklimit.py.native.exp new file mode 100644 index 0000000000..f9d30c0585 --- /dev/null +++ b/tests/basics/sys_tracebacklimit.py.native.exp @@ -0,0 +1,22 @@ +ValueError: value + +limit 4 +ValueError: value + +limit 3 +ValueError: value + +limit 2 +ValueError: value + +limit 1 +ValueError: value + +limit 0 +ValueError: value + +limit -1 +ValueError: value + +True +False diff --git a/tests/micropython/emg_exc.py.native.exp b/tests/micropython/emg_exc.py.native.exp new file mode 100644 index 0000000000..9677c526a9 --- /dev/null +++ b/tests/micropython/emg_exc.py.native.exp @@ -0,0 +1,2 @@ +ValueError: 1 + diff --git a/tests/micropython/heapalloc_traceback.py.native.exp b/tests/micropython/heapalloc_traceback.py.native.exp new file mode 100644 index 0000000000..d6ac26aa82 --- /dev/null +++ b/tests/micropython/heapalloc_traceback.py.native.exp @@ -0,0 +1,3 @@ +StopIteration +StopIteration: + diff --git a/tests/misc/print_exception.py.native.exp b/tests/misc/print_exception.py.native.exp new file mode 100644 index 0000000000..59e856ae3c --- /dev/null +++ b/tests/misc/print_exception.py.native.exp @@ -0,0 +1,18 @@ +caught +Exception: msg + +caught +Exception: fail + +finally +caught +Exception: fail + +reraise +Exception: fail + +caught +Exception: fail + +AttributeError: 'function' object has no attribute 'X' + diff --git a/tests/run-tests.py b/tests/run-tests.py index f8174b2d3b..aeea0bad5e 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -126,12 +126,6 @@ emitter_tests_to_skip = { "basics/unboundlocal.py", # These require "raise from". "basics/exception_chain.py", - # These require proper traceback info. - "basics/sys_tracebacklimit.py", - "misc/print_exception.py", - "micropython/emg_exc.py", - "micropython/heapalloc_traceback.py", - "thread/thread_exc2.py", # These require stack-allocated slice optimisation. "micropython/heapalloc_slice.py", # These require running the scheduler. diff --git a/tests/thread/thread_exc2.py.native.exp b/tests/thread/thread_exc2.py.native.exp new file mode 100644 index 0000000000..9b2e715ef8 --- /dev/null +++ b/tests/thread/thread_exc2.py.native.exp @@ -0,0 +1,3 @@ +Unhandled exception in thread started by +ValueError: +done