circuitpython/tests
Jeff Epler 492402f23f
these must be treated as manual tests for now
2021-11-20 21:14:31 -05:00
..
basics Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
circuitpython these must be treated as manual tests for now 2021-11-20 21:14:31 -05:00
circuitpython-manual these must be treated as manual tests for now 2021-11-20 21:14:31 -05:00
cmdline Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
cpydiff Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
extmod Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
feature_check Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
float Merge tag 'v1.16' 2021-06-18 10:54:19 -05:00
import Merge tag 'v1.16' 2021-06-18 10:54:19 -05:00
inlineasm Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
internal_bench Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
io Merge MicroPython v1.15 into CircuitPython 2021-05-12 17:51:42 -07:00
jni Merge MicroPython v1.15 into CircuitPython 2021-05-12 17:51:42 -07:00
micropython Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
misc remove legacy sys.atexit() implementation 2021-07-30 10:00:00 +05:30
perf_bench Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
pybnative tests/pybnative: Make while.py test run on boards without pyb.delay. 2021-09-01 00:43:41 +10:00
qemu-arm Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
stress Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
thread Merge tag 'v1.16' 2021-06-18 10:54:19 -05:00
unicode Fix unicode test 2021-08-17 18:18:46 -07:00
unix enable rainbowio on unix coverage port 2021-11-12 17:31:14 -06:00
README tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
pyboard.py Updated per pre-commit 2021-11-14 14:06:47 -05:00
run-internalbench.py Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
run-multitests.py tests/run-multitests.py: Add broadcast and wait facility. 2021-08-13 23:26:34 +10:00
run-natmodtests.py Merge MicroPython 1.12 into CircuitPython 2021-05-03 14:01:18 -07:00
run-perfbench.py tests/run-perfbench.py: Fix native feature check. 2021-05-11 23:45:36 +10:00
run-tests-exp.py Merge MicroPython v1.15 into CircuitPython 2021-05-12 17:51:42 -07:00
run-tests-exp.sh tests: Rename run-tests to run-tests.py for consistency. 2021-03-12 19:56:09 +11:00
run-tests.py tests: run circuitpython tests during `make test` 2021-11-12 17:31:14 -06:00
skip_if.py run code formatting script 2021-03-15 19:27:36 +05:30

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.