Skip to content

Files

This branch is 3835 commits behind micropython/micropython:master.

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 29, 2021
Nov 19, 2021
Nov 25, 2021
Mar 12, 2021
Jan 4, 2022
Aug 14, 2021
Jun 18, 2021
May 30, 2021
Mar 30, 2020
Mar 30, 2020
Dec 17, 2021
Mar 12, 2021
Nov 17, 2021
Dec 18, 2020
Aug 14, 2021
Aug 13, 2021
Jun 26, 2021
Apr 23, 2021
Sep 13, 2021
Jul 18, 2021
Aug 31, 2021
Aug 20, 2019
Mar 30, 2020
May 10, 2021
Mar 30, 2020
Dec 17, 2021
Mar 30, 2020
Mar 12, 2021
Mar 12, 2021
Aug 13, 2021
Sep 3, 2020
May 11, 2021
Mar 12, 2021
Mar 12, 2021
Dec 29, 2021
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.