Damien George
627852019b
tests: Add test for compile builtin.
2014-10-25 22:07:25 +01:00
Paul Sokolovsky
e2f8d98525
stream: Add optional 2nd "length" arg to .readinto() - extension to CPython.
...
While extension to file.readinto() definition of CPython, the additional arg
is similar to what in CPython available in socket.recv_into().
2014-10-23 21:43:59 +03:00
Damien George
dd4f4530ab
py: Add builtin memoryview object (mostly using array code).
2014-10-23 13:34:35 +01:00
Damien George
f5d69794a8
extmod: Add uheapq module.
2014-10-22 23:20:15 +01:00
Damien George
e72be1b999
py: Fix smallint modulo with negative arguments.
...
Addresses issue #927 .
2014-10-22 23:05:50 +01:00
Damien George
e7a478204a
py: Remove unused and unneeded SystemError exception.
...
It's purpose is for internal errors that are not catastrophic (ie not as
bad as RuntimeError). Since we don't use it, we don't need it.
2014-10-22 19:42:55 +01:00
Damien George
481d714bd5
stmhal: Overhaul UART class to use read/write, and improve it.
...
UART object now uses a stream-like interface: read, readall, readline,
readinto, readchar, write, writechar.
Timeouts are configured when the UART object is initialised, using
timeout and timeout_char keyword args.
The object includes optional read buffering, using interrupts. You can set
the buffer size dynamically using read_buf_len keyword arg. A size of 0
disables buffering.
2014-10-21 22:15:20 +01:00
stijn
a3efe04dce
Use mode/encoding kwargs in io and unicode tests
...
mode argument is used to assert it works
encoding argument is used to make sure CPython uses the correct encoding
as it does not automatically use utf-8
2014-10-21 22:10:38 +03:00
Damien George
21ca2d76a2
py: Partially fix viper multi-comparison; add test for it.
2014-10-19 19:00:51 +01:00
Paul Sokolovsky
1a55b6a787
unix, stmhal: Implement file.readinto() method.
...
Also, usocket.readinto(). Known issue is that .readinto() should be available
only for binary files, but micropython uses single method table for both
binary and text files.
2014-10-18 22:44:07 +03:00
Paul Sokolovsky
297d8469b8
modure: Update to re1.5 v0.6.1, fixed and extended character class support.
2014-10-17 22:25:18 +03:00
Damien George
391db8669b
py: Add more compiler optimisations for constant if/while conditions.
2014-10-17 17:57:33 +00:00
Damien George
9870fdd4b0
tests: Add test for nested while with exc and break.
2014-10-17 17:28:25 +00:00
Paul Sokolovsky
067ae1269d
objclosure: Fix printing of generator closures.
...
The code previously assumed that only functions can be closed over.
2014-10-16 00:14:01 +03:00
Paul Sokolovsky
95908b0f50
modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).
2014-10-15 04:44:07 +03:00
Damien George
29f5682621
Merge pull request #904 from pfalcon/moduzlib
...
Module "uzlib" - based on similarly named library
2014-10-12 23:25:24 +01:00
Paul Sokolovsky
34162872b1
moduzlib: Integrate into the system.
2014-10-13 00:07:44 +03:00
Damien George
91cfd414c0
py: Implement native load for viper.
...
Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using
machine instructions.
2014-10-12 16:59:29 +01:00
Damien George
1ef2348df0
py: Implement and,or,xor native ops for viper.
2014-10-12 14:21:06 +01:00
Paul Sokolovsky
f7bcce0552
modure: Basic tests.
2014-10-11 14:36:33 +03:00
Paul Sokolovsky
5dc8f9b28a
tests: Skip ffi_float.py if module ffi is not available.
2014-10-06 22:37:40 +03:00
Paul Sokolovsky
9aeec0e3a3
tests: Add missing "import sys".
2014-10-06 22:30:46 +03:00
Damien George
f53c343363
tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh.
2014-10-06 17:35:46 +00:00
Damien George
9c6f7378f7
tests: Make run-tests-exp.sh skip tests that fail due to invalid decorator.
...
Should address issue #856 .
2014-10-06 17:06:49 +00:00
Damien George
5a04e2cca8
tests: Add check for micropython.native and then skip relevant tests.
...
If micropython.native decorator doesn't compile, then we skill all
native/viper tests.
This patch also re-enables the ujson_loads test on NT.
Addresses issue #861 , and partially addresses issue #856 .
2014-10-05 22:27:12 +01:00