micropython/tests
Damien George 025e4b6fbc tests/basics: Split out literal tests that raise SyntaxWarning on CPy.
Fixes issue #7330.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-30 13:41:37 +10:00
..
basics tests/basics: Split out literal tests that raise SyntaxWarning on CPy. 2021-05-30 13:41:37 +10:00
cmdline
cpydiff tests/cpydiff: Add test and workaround for function.__module__ attr. 2021-05-16 11:06:46 +10:00
esp32
extmod tests/extmod/btree_gc.py: Close the database to avoid a memory leak. 2021-05-30 11:50:51 +10:00
feature_check
float tests: Make float and framebuf tests skip or run on big-endian archs. 2021-05-26 16:33:18 +10:00
import
inlineasm
internal_bench
io
jni
micropython py/emitnative: Fix x86-64 emitter to generate correct 8/16-bit stores. 2021-05-20 23:43:25 +10:00
misc
multi_bluetooth
multi_net
net_hosted
net_inet
perf_bench
pyb
pybnative
qemu-arm
stress
thread
unicode
unix
wipy
README
run-internalbench.py
run-multitests.py tests/run-multitests.py: Flush stdout for each line of trace output. 2021-05-13 16:26:07 +10:00
run-natmodtests.py
run-perfbench.py tests/run-perfbench.py: Fix native feature check. 2021-05-11 23:45:36 +10:00
run-tests-exp.py
run-tests-exp.sh
run-tests.py tests/run-tests.py: Parallelize running tests by default. 2021-05-14 11:33:31 +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.