micropython/tests
Damien George 7dffbfd22a extmod/vfs_lfsx: Fix import_stat so it takes into account current dir.
CPython semantics require searching the current directory if the import is
not absolute (when "" is in sys.path).

Fixes issue #6037.
2020-05-15 11:31:32 +10:00
..
basics py/parse: Support constant folding of power operator for integers. 2020-05-03 16:23:19 +10:00
cmdline
cpydiff tests/cpydiff: Add cpydiff test for __all__ used in imported package. 2020-05-02 17:41:04 +10:00
esp32 esp32/modsocket: Fix getaddrinfo to raise on error. 2020-05-09 16:43:48 +10:00
extmod extmod/vfs_lfsx: Fix import_stat so it takes into account current dir. 2020-05-15 11:31:32 +10:00
feature_check
float py/objint: Do not use fpclassify. 2020-04-18 22:42:24 +10:00
import
inlineasm
internal_bench
io
jni
micropython py/parse: Support constant folding of power operator for integers. 2020-05-03 16:23:19 +10:00
misc
multi_bluetooth extmod/modbluetooth: Add support for changing the GAP device name. 2020-05-11 21:30:41 +10:00
multi_net
net_hosted
net_inet esp32/modsocket: Fix getaddrinfo to raise on error. 2020-05-09 16:43:48 +10:00
perf_bench
pyb
pybnative
qemu-arm
stress
thread tests/thread/thread_stacksize1.py: Increase stack size for CPython. 2020-05-05 00:43:24 +10:00
unicode
unix
wipy
README
run-internalbench.py
run-multitests.py tests/run-multitests.py: Add TRACE banner and move TEST output to end. 2020-05-09 00:06:06 +10:00
run-natmodtests.py
run-perfbench.py
run-tests tests/run-tests: Skip REPL feature checks when running via pyboard.py. 2020-05-09 16:20:40 +10:00
run-tests-exp.py
run-tests-exp.sh

README

This directory contains tests for various functionality areas of MicroPython.
To run all stable tests, run "run-tests" 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 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 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.