Michael Buesch
17298af61e
py/modmath: Add domain error checking to sqrt, log, log2, log10.
...
These functions will raise 'ValueError: math domain error' on invalid
input.
2015-12-12 15:12:54 +00:00
Damien George
29e9db0c58
py: Fix compiler to handle lambdas used as default arguments.
...
Addresses issue #1709 .
2015-12-12 13:42:51 +00:00
Paul Sokolovsky
a6eff059b9
unix: Rename "_os" module to "uos" for consistency with baremetal ports.
2015-12-12 00:04:35 +02:00
Damien George
de2a2e296b
tests: Add test for "not" of a user defined class.
2015-12-10 22:21:57 +00:00
Henrik Sölver
e242b1785f
py/emitinlinethumb: Add support for MRS instruction.
...
Only IPSR and BASEPRI special registers supported at the moment, but easy
to extend in the future.
2015-12-10 17:32:54 +00:00
Dave Hylands
5a4a2b1db3
extmod: Add test which demonstrates LITTLE_ENDIAN packing failure
2015-12-09 21:43:28 +02:00
Damien George
3ff259a262
py: Fix calling of parent classmethod from instance of subclass.
...
Addresses issue #1697 .
2015-12-09 17:30:01 +00:00
Damien George
0891cf7d2d
tests: Disable for_range.py test for native emitter (it requires yield).
2015-12-08 21:39:21 +00:00
Damien George
33ac0fd09f
py: Don't try to optimise for+range when args are not simple expressions.
...
Addresses issue #1693 .
2015-12-08 21:05:14 +00:00
Paul Sokolovsky
55995869e5
tests/builtin_minmax: Make compatible with @native codegen.
2015-12-07 19:32:48 +02:00
Paul Sokolovsky
36c6d2fa7d
tests/builtin_minmax: Add testcase for lazy iterable (generator).
2015-12-07 18:59:18 +02:00
pohmelie
e23d5a64cf
tests: Add min/max "default" agrument test
2015-12-07 18:56:25 +02:00
Paul Sokolovsky
cbc489dff5
tests: Actuall add feature check for complex type being available.
2015-12-06 15:13:26 +02:00
Paul Sokolovsky
eed2f36ae2
tests/run-tests: Allow to skip complex tests if it's not compiled in.
2015-12-06 14:57:31 +02:00
Paul Sokolovsky
54a1d9ecb7
tests/extra_coverage: Update for sys.modules addition.
2015-12-05 00:13:29 +02:00
Damien George
7a99639cff
py: Fix function calls that have positional and a star-arg-with-iterator.
...
Addresses issue #1678 .
2015-12-03 17:59:49 +00:00
Damien George
0d9b450701
stmhal: Make uart.write() function correctly for timeout=0.
...
In non-blocking mode (timeout=0), uart.write() can now transmit all of its
data without raising an exception. uart.read() also works correctly in
this mode.
As part of this patch, timout_char now has a minimum value which is long
enough to transfer 1 character.
Addresses issue #1533 .
2015-11-30 17:29:52 +00:00
Ryan Shaw
f99491cbf7
stmhal: uart.any() function now returns number of bytes available.
2015-11-30 13:07:20 +00:00
Paul Sokolovsky
ff8c4188f4
tests/run-tests: Improve robustness of REPL tests.
...
Unconditionally wait for MicroPython banner. On overloaded systems, when
using emulators, etc. initial executable startup may take more than 20ms.
2015-11-24 19:52:30 +02:00
Damien George
9a56912ad1
py/compile: Do proper checking of * and ** in function definition.
...
This patch checks that there is only one *, and that ** is last in the
arg list.
2015-11-23 16:50:42 +00:00
Damien George
0e3f29cc99
py: Check that second argument to hasattr is actually a string.
...
Fixes issue #1623 .
2015-11-23 15:57:00 +00:00
Paul Sokolovsky
4120f32292
tests/int_big_*: Add more tests for result normalization.
...
Tested by comparability to small int/casting to bool.
2015-11-22 22:11:01 +02:00
Paul Sokolovsky
b56c635d64
tests/int_big_xor: Test that xor result is normalized.
...
And thus can be successfully used in comparisons, etc.
2015-11-22 22:02:15 +02:00
Paul Sokolovsky
b64e0575fd
tests/float/string_format: Add testcase for incorrect rounding for %f.
2015-11-22 18:08:49 +02:00
Damien George
2c83894257
py: Implement default and star args for lambdas.
2015-11-17 14:00:14 +00:00