summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-09-16 15:13:10 +1000
committerDamien George <damien@micropython.org>2025-10-01 11:54:26 +1000
commit4c9ce826cbfbd99cff10cc933064f87a13bee4ac (patch)
treea157797c24f45eb982bbc13d11a33853fc684a2c /tests
parente031ead6b2043c412abb38804c1a1e350237e642 (diff)
tests: Remove .py.exp files that match with CPython 3.8.2 or newer.
Running the tests now requires CPython 3.8.2 or newer, which was released February 2020 and should be widely available. A few examples of features that were previously not supported by CPython, but which are now: - %-formatting for bytes and bytearray (PEP 461), CPython 3.5 - annotated variables (PEP 526), CPython 3.6 - assignment expressions (PEP 572), CPython 3.8 Note that `basics/fun_code_full.py.exp` is added here because that requires CPython 3.10 or newer. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/README.md3
-rw-r--r--tests/basics/annotate_var.py.exp5
-rw-r--r--tests/basics/assign_expr.py.exp16
-rw-r--r--tests/basics/assign_expr_scope.py.exp23
-rw-r--r--tests/basics/async_await.py.exp32
-rw-r--r--tests/basics/async_await2.py.exp5
-rw-r--r--tests/basics/async_def.py.exp3
-rw-r--r--tests/basics/async_for.py.exp51
-rw-r--r--tests/basics/async_for2.py.exp32
-rw-r--r--tests/basics/async_syntaxerror.py.exp2
-rw-r--r--tests/basics/async_with.py.exp11
-rw-r--r--tests/basics/async_with2.py.exp17
-rw-r--r--tests/basics/async_with_break.py.exp15
-rw-r--r--tests/basics/async_with_return.py.exp15
-rw-r--r--tests/basics/bytes_format_modulo.py.exp5
-rw-r--r--tests/basics/class_inplace_op2.py.exp12
-rw-r--r--tests/basics/class_ordereddict.py.exp1
-rw-r--r--tests/basics/fun_code_full.py.exp9
-rw-r--r--tests/basics/python36.py.exp5
-rw-r--r--tests/basics/special_methods2.py.exp19
-rw-r--r--tests/basics/string_fstring_debug.py.exp9
-rw-r--r--tests/basics/try_finally_continue.py.exp9
-rw-r--r--tests/extmod/asyncio_basic.py.exp6
-rw-r--r--tests/extmod/asyncio_lock.py.exp41
-rw-r--r--tests/extmod/asyncio_wait_task.py.exp12
-rw-r--r--tests/extmod/json_loads_bytes.py.exp2
-rw-r--r--tests/extmod/re_sub_unmatched.py.exp1
27 files changed, 11 insertions, 350 deletions
diff --git a/tests/README.md b/tests/README.md
index 6a6395c39..676e9d832 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,6 +1,7 @@
# MicroPython Test Suite
-This directory contains tests for most parts of MicroPython.
+This directory contains tests for most parts of MicroPython. To run it you will need
+CPython 3.8.2 or newer, which is used to validate MicroPython's behaviour.
To run all stable tests, run the "run-tests.py" script in this directory. By default
that will run the test suite against the unix port of MicroPython.
diff --git a/tests/basics/annotate_var.py.exp b/tests/basics/annotate_var.py.exp
deleted file mode 100644
index 9b6536e96..000000000
--- a/tests/basics/annotate_var.py.exp
+++ /dev/null
@@ -1,5 +0,0 @@
-False
-1
-(1, 2)
-NameError
-1
diff --git a/tests/basics/assign_expr.py.exp b/tests/basics/assign_expr.py.exp
deleted file mode 100644
index 47da56b80..000000000
--- a/tests/basics/assign_expr.py.exp
+++ /dev/null
@@ -1,16 +0,0 @@
-4
-True
-2
-4 5
-5
-1 5 5
-5
-2 1
-1 0
-any True
-8
-123
-any True
-8
-[(1, 0), (2, 2), (3, 6), (4, 12)]
-4
diff --git a/tests/basics/assign_expr_scope.py.exp b/tests/basics/assign_expr_scope.py.exp
deleted file mode 100644
index 5c780b382..000000000
--- a/tests/basics/assign_expr_scope.py.exp
+++ /dev/null
@@ -1,23 +0,0 @@
-scope0
-1
-None
-scope1
-[1]
-1
-None
-scope2
-[0, 1]
-1
-1
-scope3
-[0, 1]
-None
-None
-scope4
-[0, 1]
-1
-1
-scope5
-[0, 1]
-1
-None
diff --git a/tests/basics/async_await.py.exp b/tests/basics/async_await.py.exp
deleted file mode 100644
index b51c388a9..000000000
--- a/tests/basics/async_await.py.exp
+++ /dev/null
@@ -1,32 +0,0 @@
-4
-3
-2
-1
-0
-0
-1
-0
-0
-2
-1
-0
-0
-1
-0
-0
-3
-2
-1
-0
-0
-1
-0
-0
-2
-1
-0
-0
-1
-0
-0
-finished
diff --git a/tests/basics/async_await2.py.exp b/tests/basics/async_await2.py.exp
deleted file mode 100644
index fc9ff0aa5..000000000
--- a/tests/basics/async_await2.py.exp
+++ /dev/null
@@ -1,5 +0,0 @@
-wait value: 1
-return from send: message from wait(1)
-wait got back: message from main
-x = 100
-got StopIteration
diff --git a/tests/basics/async_def.py.exp b/tests/basics/async_def.py.exp
deleted file mode 100644
index f555ace99..000000000
--- a/tests/basics/async_def.py.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-decorator
-foo
-StopIteration
diff --git a/tests/basics/async_for.py.exp b/tests/basics/async_for.py.exp
deleted file mode 100644
index 6f59979c0..000000000
--- a/tests/basics/async_for.py.exp
+++ /dev/null
@@ -1,51 +0,0 @@
-== start ==
-init
-aiter
-init
-anext
-a
-anext
-b
-anext
-c
-anext
-== finish ==
-== start ==
-init
-aiter
-init
-anext
-d
-anext
-e
-anext
-f
-anext
-AsyncIteratorWrapper-def
-== finish ==
-init
-== start ==
-aiter
-init
-anext
-g
-anext
-h
-anext
-i
-anext
-AsyncIteratorWrapper-ghi
-== finish ==
-init
-== start ==
-aiter
-init
-anext
-j
-anext
-k
-anext
-l
-anext
-AsyncIteratorWrapper-jkl
-== finish ==
diff --git a/tests/basics/async_for2.py.exp b/tests/basics/async_for2.py.exp
deleted file mode 100644
index 52bbe90c8..000000000
--- a/tests/basics/async_for2.py.exp
+++ /dev/null
@@ -1,32 +0,0 @@
-init
-aiter
-anext
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-x 0
-anext
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-x 1
-anext
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-x 2
-anext
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-x 3
-anext
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-finished
diff --git a/tests/basics/async_syntaxerror.py.exp b/tests/basics/async_syntaxerror.py.exp
deleted file mode 100644
index 5275689b4..000000000
--- a/tests/basics/async_syntaxerror.py.exp
+++ /dev/null
@@ -1,2 +0,0 @@
-SyntaxError
-SyntaxError
diff --git a/tests/basics/async_with.py.exp b/tests/basics/async_with.py.exp
deleted file mode 100644
index 6bbf84cb4..000000000
--- a/tests/basics/async_with.py.exp
+++ /dev/null
@@ -1,11 +0,0 @@
-enter
-body
-exit None None
-finished
-enter
-1
-exit <class 'ValueError'> error
-ValueError
-enter
-exit <class 'BaseException'>
-BaseException
diff --git a/tests/basics/async_with2.py.exp b/tests/basics/async_with2.py.exp
deleted file mode 100644
index 76b173b4c..000000000
--- a/tests/basics/async_with2.py.exp
+++ /dev/null
@@ -1,17 +0,0 @@
-enter
-f start: 10
-coro yielded: 11
-coro yielded: 12
-f returned: 13
-body start
-f start: 30
-coro yielded: 31
-coro yielded: 32
-body f returned: 33
-body end
-exit None None
-f start: 20
-coro yielded: 21
-coro yielded: 22
-f returned: 23
-finished
diff --git a/tests/basics/async_with_break.py.exp b/tests/basics/async_with_break.py.exp
deleted file mode 100644
index d077a88fa..000000000
--- a/tests/basics/async_with_break.py.exp
+++ /dev/null
@@ -1,15 +0,0 @@
-enter
-body
-exit None None
-finished
-enter
-body
-exit None None
-finally
-finished
-enter
-body
-exit None None
-finally inner
-finally outer
-finished
diff --git a/tests/basics/async_with_return.py.exp b/tests/basics/async_with_return.py.exp
deleted file mode 100644
index d077a88fa..000000000
--- a/tests/basics/async_with_return.py.exp
+++ /dev/null
@@ -1,15 +0,0 @@
-enter
-body
-exit None None
-finished
-enter
-body
-exit None None
-finally
-finished
-enter
-body
-exit None None
-finally inner
-finally outer
-finished
diff --git a/tests/basics/bytes_format_modulo.py.exp b/tests/basics/bytes_format_modulo.py.exp
deleted file mode 100644
index 782b7f91f..000000000
--- a/tests/basics/bytes_format_modulo.py.exp
+++ /dev/null
@@ -1,5 +0,0 @@
-b'%'
-b'=1='
-b'=1=2='
-b'=str='
-b"=b'str'="
diff --git a/tests/basics/class_inplace_op2.py.exp b/tests/basics/class_inplace_op2.py.exp
deleted file mode 100644
index 8c323b517..000000000
--- a/tests/basics/class_inplace_op2.py.exp
+++ /dev/null
@@ -1,12 +0,0 @@
-__imul__
-__imatmul__
-__ifloordiv__
-__itruediv__
-__imod__
-__ipow__
-__ior__
-__ixor__
-__iand__
-__ilshift__
-__irshift__
-TypeError
diff --git a/tests/basics/class_ordereddict.py.exp b/tests/basics/class_ordereddict.py.exp
deleted file mode 100644
index b723e3275..000000000
--- a/tests/basics/class_ordereddict.py.exp
+++ /dev/null
@@ -1 +0,0 @@
-['a', 'b', 'c', 'd', 'e']
diff --git a/tests/basics/fun_code_full.py.exp b/tests/basics/fun_code_full.py.exp
new file mode 100644
index 000000000..830effadf
--- /dev/null
+++ b/tests/basics/fun_code_full.py.exp
@@ -0,0 +1,9 @@
+<class 'bytes'>
+(None,)
+fun_code_full.py
+<class 'int'>
+f
+True
+0
+0
+non-contiguous
diff --git a/tests/basics/python36.py.exp b/tests/basics/python36.py.exp
deleted file mode 100644
index 4b65daafa..000000000
--- a/tests/basics/python36.py.exp
+++ /dev/null
@@ -1,5 +0,0 @@
-100000
-165
-65535
-123
-83
diff --git a/tests/basics/special_methods2.py.exp b/tests/basics/special_methods2.py.exp
deleted file mode 100644
index a9ae75be5..000000000
--- a/tests/basics/special_methods2.py.exp
+++ /dev/null
@@ -1,19 +0,0 @@
-__pos__ called
-__pos__ called
-__neg__ called
-__invert__ called
-__mul__ called
-__matmul__ called
-__truediv__ called
-__floordiv__ called
-__iadd__ called
-__isub__ called
-__mod__ called
-__pow__ called
-__or__ called
-__and__ called
-__xor__ called
-__lshift__ called
-__rshift__ called
-['a', 'b', 'c']
-False
diff --git a/tests/basics/string_fstring_debug.py.exp b/tests/basics/string_fstring_debug.py.exp
deleted file mode 100644
index f0309e1c9..000000000
--- a/tests/basics/string_fstring_debug.py.exp
+++ /dev/null
@@ -1,9 +0,0 @@
-x=1
-x=00000001
-a x=1 b 2 c
-a x=00000001 b 2 c
-a f() + g("foo") + h()=15 b
-a f() + g("foo") + h()=0000000f b
-a 1,=(1,) b
-a x,y,=(1, 2) b
-a x,1=(1, 1) b
diff --git a/tests/basics/try_finally_continue.py.exp b/tests/basics/try_finally_continue.py.exp
deleted file mode 100644
index 2901997b1..000000000
--- a/tests/basics/try_finally_continue.py.exp
+++ /dev/null
@@ -1,9 +0,0 @@
-4 0
-continue
-4 1
-continue
-4 2
-continue
-4 3
-continue
-None
diff --git a/tests/extmod/asyncio_basic.py.exp b/tests/extmod/asyncio_basic.py.exp
deleted file mode 100644
index 478e22abc..000000000
--- a/tests/extmod/asyncio_basic.py.exp
+++ /dev/null
@@ -1,6 +0,0 @@
-start
-after sleep
-short
-long
-negative
-took 200 400 0
diff --git a/tests/extmod/asyncio_lock.py.exp b/tests/extmod/asyncio_lock.py.exp
deleted file mode 100644
index a37dfcbd2..000000000
--- a/tests/extmod/asyncio_lock.py.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-False
-True
-False
-have lock
-----
-task start 1
-task start 2
-task start 3
-task have 1 0
-task have 2 0
-task have 3 0
-task have 1 1
-task have 2 1
-task have 3 1
-task have 1 2
-task end 1
-task have 2 2
-task end 2
-task have 3 2
-task end 3
-----
-task have True
-task release False
-task have True
-task release False
-task have again
-task have again
-----
-task got 0
-task release 0
-task cancel 1
-task got 2
-task release 2
-False
-----
-task got 0
-task cancel 1
-task release 0
-task got 2
-task cancel 2
-False
diff --git a/tests/extmod/asyncio_wait_task.py.exp b/tests/extmod/asyncio_wait_task.py.exp
deleted file mode 100644
index 514a43422..000000000
--- a/tests/extmod/asyncio_wait_task.py.exp
+++ /dev/null
@@ -1,12 +0,0 @@
-start
-task 1
-task 2
-----
-start
-hello
-world
-took 200 200
-task_raise
-ValueError
-task_raise
-ValueError
diff --git a/tests/extmod/json_loads_bytes.py.exp b/tests/extmod/json_loads_bytes.py.exp
deleted file mode 100644
index c2735a990..000000000
--- a/tests/extmod/json_loads_bytes.py.exp
+++ /dev/null
@@ -1,2 +0,0 @@
-[1, 2]
-[None]
diff --git a/tests/extmod/re_sub_unmatched.py.exp b/tests/extmod/re_sub_unmatched.py.exp
deleted file mode 100644
index 1e5f0fda0..000000000
--- a/tests/extmod/re_sub_unmatched.py.exp
+++ /dev/null
@@ -1 +0,0 @@
-1-a2