circuitpython/tests
Dan Halbert 4a62665175 fix native tests 2023-08-22 12:57:47 -04:00
..
basics remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
circuitpython remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
circuitpython-manual remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
cmdline remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
cpydiff initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
extmod remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
feature_check remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
float remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
import run updated pre-commit 2023-02-01 13:38:41 +05:30
inlineasm remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
internal_bench
io remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
jni Merge MicroPython v1.15 into CircuitPython 2021-05-12 17:51:42 -07:00
micropython remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
misc remove lib from exludes, fix all remaining typos 2023-03-23 13:59:08 +07:00
perf_bench remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
stress remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
testlib Add some more Note tests 2023-05-24 10:00:12 -05:00
thread remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
unicode run updated pre-commit 2023-02-01 13:38:41 +05:30
unix remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
vectorio remove unused import 2022-03-19 11:36:23 -05:00
README
endorse.py add a script to make it easy to endorse test output 2023-08-18 12:50:06 -05:00
pyboard.py countio: add selectable rise and fall detection, pulls 2021-12-31 16:34:58 -05:00
run-internalbench.py run updated pre-commit 2023-02-01 13:38:41 +05:30
run-multitests.py tests/run-multitests.py: Read IP address from boot nic if available. 2022-06-03 14:35:37 +10:00
run-natmodtests.py fix native tests 2023-08-22 12:57:47 -04:00
run-perfbench-table.py initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
run-perfbench.py Fix .bin, .hex and .uf2 with new linker sections 2023-03-20 14:02:57 -07:00
run-tests-exp.py remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
run-tests-exp.sh
run-tests.py remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
skip_if.py

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.