micropython/tests
Damien George adf35cbab0 tests/float: Make bytes/bytearray construct tests work with obj repr C.
2.5 can be represented correctly in object representation C, but 2.3 cannot
(it is slightly truncated).

Signed-off-by: Damien George <damien@micropython.org>
2021-06-18 14:16:07 +10:00
..
basics
cmdline
cpydiff tests/cpydiff: Add test for array constructor with overflowing value. 2021-06-13 10:30:14 +10:00
esp32
extmod extmod/uasyncio: Fix race with cancelled task waiting on finished task. 2021-06-16 13:02:37 +10:00
feature_check
float tests/float: Make bytes/bytearray construct tests work with obj repr C. 2021-06-18 14:16:07 +10:00
import
inlineasm
internal_bench
io
jni
micropython
misc
multi_bluetooth tests/multi_bluetooth/ble_gap_advertise.py: Allow to work without set. 2021-06-06 21:58:07 +10:00
multi_net extmod/uasyncio: Add readinto() method to Stream class. 2021-06-15 13:13:35 +10:00
net_hosted
net_inet
perf_bench
pyb
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
run-natmodtests.py
run-perfbench.py
run-tests-exp.py
run-tests-exp.sh
run-tests.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.