micropython/tests
Jim Mussared 91a99fcf0e tests/extmod/vfs_fat_finaliser.py: Ensure alloc at never-used GC blocks.
Prevents the finaliser from being missed if there's a dangling reference
on the stack to one of the blocks for the files (that this test checks
that they get finalised).

See github.com/micropython/micropython/pull/7659#issuecomment-899479793

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-17 11:20:58 +10:00
..
basics py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00
cmdline py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00
cpydiff py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00
esp32
extmod tests/extmod/vfs_fat_finaliser.py: Ensure alloc at never-used GC blocks. 2021-08-17 11:20:58 +10:00
feature_check py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00
float tests/float: Make bytes/bytearray construct tests work with obj repr C. 2021-06-18 14:16:07 +10:00
import py/builtinimport: Change relative import's ValueError to ImportError. 2021-05-30 19:35:03 +10:00
inlineasm
internal_bench
io
jni
micropython py/emitnative: Ensure stack settling is safe mid-branch. 2021-07-19 23:18:59 +10:00
misc
multi_bluetooth tests/multi_bluetooth/ble_subscribe.py: Add test for subscription. 2021-08-14 22:44:47 +10:00
multi_net extmod/modlwip: Fix close and clean up of UDP and raw sockets. 2021-08-13 23:46:11 +10:00
net_hosted extmod/uasyncio: Get addr and bind server socket before creating task. 2021-06-26 22:30:22 +10:00
net_inet
perf_bench
pyb stm32: Replace master/slave with controller/peripheral in I2C and SPI. 2021-07-18 11:23:41 +10:00
pybnative
qemu-arm
stress
thread
unicode
unix tests/unix: Add ffi test for integer types. 2021-06-06 22:52:25 +10:00
wipy
README
run-internalbench.py
run-multitests.py tests/run-multitests.py: Add broadcast and wait facility. 2021-08-13 23:26:34 +10:00
run-natmodtests.py
run-perfbench.py
run-tests-exp.py
run-tests-exp.sh
run-tests.py py: Implement partial PEP-498 (f-string) support. 2021-08-14 16:58:40 +10:00

README

This directory contains tests for various functionality areas of MicroPython.
To run all stable tests, run "run-tests.py" script in this directory.

Tests of capabilities not supported on all platforms should be written
to check for the capability being present. If it is not, the test
should merely output 'SKIP' followed by the line terminator, and call
sys.exit() to raise SystemExit, instead of attempting to test the
missing capability. The testing framework (run-tests.py in this
directory, test_main.c in qemu_arm) recognizes this as a skipped test.

There are a few features for which this mechanism cannot be used to
condition a test. The run-tests.py script uses small scripts in the
feature_check directory to check whether each such feature is present,
and skips the relevant tests if not.

Tests are generally verified by running the test both in MicroPython and
in CPython and comparing the outputs. If the output differs the test fails
and the outputs are saved in a .out and a .exp file respectively.
For tests that cannot be run in CPython, for example because they use
the machine module, a .exp file can be provided next to the test's .py
file. A convenient way to generate that is to run the test, let it fail
(because CPython cannot run it) and then copy the .out file (but not
before checking it manually!)

When creating new tests, anything that relies on float support should go in the
float/ subdirectory.  Anything that relies on import x, where x is not a built-in
module, should go in the import/ subdirectory.