For the sake of older versions of gcc (and other compilers), don't use
the #warning CPP directive, nor the -Wno-error=cpp option.
Also, fix a strict alias warning in modffi.c for older compilers, and
add a test for ffi module.
Addresses issue #847.
With unicode enabled, this patch allows reading a fixed number of
characters from text-mode streams; eg file.read(5) will read 5 unicode
chars, which can made of more than 5 bytes.
For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If
there are lots of non-ASCII chars in a stream, then it needs multiple
reads of the underlying object.
Adds a new test for this case. Enables unicode support by default on
unix and stmhal ports.
You can now do:
X = const(123)
Y = const(456 + X)
and the compiler will replace X and Y with their values.
See discussion in issue #266 and issue #573.
In tests/pyb is now a suite of tests that tests the pyb module on the
pyboard. They include expected output files because we can't run
CPython on the pyboard to compare against.
run-tests script has now been updated to allow pyboard tests to be run.
Just pass the option --pyboard. This runs all basic, float and pyb
tests. Note that float/math-fun.py currently fails because not all math
functions are implemented in stmhal/.
Tests in basics (which should probably be renamed to core) should not
rely on float, or import any non-built-in files. This way these tests
can be run when those features are not available.
All test in basics now pass on the pyboard using stmhal port, except for
string-repr which has some issues with character hex printing.
To run the tests on the pyboard you need to set the "test_on_pyboard"
variable to "True", and also have tools/pyboard.py available for import
(easiest is to symlink to it).
I upgraded to Python 3.4.0, so needed to make these changes. Hopefully
the tests still run with Python 3.3.x (the scripts use python3 so are
agnostic as to the subversion).
Bytecode tests are tightly coupled to the Python version, and now some
fail against Python 3.4.