micropython/tests
Damien George 65dc960e3b unix-cpy: Remove unix-cpy. It's no longer needed.
unix-cpy was originally written to get semantic equivalent with CPython
without writing functional tests.  When writing the initial
implementation of uPy it was a long way between lexer and functional
tests, so the half-way test was to make sure that the bytecode was
correct.  The idea was that if the uPy bytecode matched CPython 1-1 then
uPy would be proper Python if the bytecodes acted correctly.  And having
matching bytecode meant that it was less likely to miss some deep
subtlety in the Python semantics that would require an architectural
change later on.

But that is all history and it no longer makes sense to retain the
ability to output CPython bytecode, because:

1. It outputs CPython 3.3 compatible bytecode.  CPython's bytecode
changes from version to version, and seems to have changed quite a bit
in 3.5.  There's no point in changing the bytecode output to match
CPython anymore.

2. uPy and CPy do different optimisations to the bytecode which makes it
harder to match.

3. The bytecode tests are not run.  They were never part of Travis and
are not run locally anymore.

4. The EMIT_CPYTHON option needs a lot of extra source code which adds
heaps of noise, especially in compile.c.

5. Now that there is an extensive test suite (which tests functionality)
there is no need to match the bytecode.  Some very subtle behaviour is
tested with the test suite and passing these tests is a much better
way to stay Python-language compliant, rather than trying to match
CPy bytecode.
2015-08-17 12:51:26 +01:00
..
basics py/objlist: Make list += accept all arguments and add test. 2015-08-02 20:53:54 +01:00
bench
cmdline tests: Remove over-specification of startup banner 2015-08-08 12:37:36 +01:00
extmod
float
import
inlineasm
io py: Add stream_tell method, and use for unix and stmhal file tell. 2015-08-13 22:56:32 +01:00
micropython
misc
pyb tests: Add test for pyboard SPI in slave mode, recv with no master. 2015-08-05 23:47:57 +01:00
pybnative
unicode
unix
README
pyboard.py
run-bench-tests
run-tests tests: Fix exceptions when running cmdline tests on windows 2015-08-08 12:35:27 +01: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. Note
that bytecode tests are not yet stable and should be run separately in
"bytecode" subdirectory.

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.