Damien George
e5ce5e2a43
tests: Skip class_bind_self.py for native emitter.
2015-12-26 13:06:50 +00:00
Damien George
78913211a9
py: Be more restrictive binding self when looking up instance attrs.
...
When looking up and extracting an attribute of an instance, some
attributes must bind self as the first argument to make a working method
call. Previously to this patch, any attribute that was callable had self
bound as the first argument. But Python specs require the check to be
more restrictive, and only functions, closures and generators should have
self bound as the first argument
Addresses issue #1675 .
2015-12-26 12:41:31 +00:00
Damien George
7ce8860b6b
tests: Skip try-finally test for native emitter.
2015-12-24 12:49:31 +00:00
Damien George
8047340d75
py: Handle case of return within the finally block of try-finally.
...
Addresses issue #1636 .
2015-12-24 12:47:39 +00:00
Damien George
117158fcd5
tests: Add tests for stream IO errors.
2015-12-23 22:37:02 +00:00
Paul Sokolovsky
664bc44f30
tests: Add tests for %-formatting of bytes.
...
This requires CPython3.5, to not require switching to it, just use .exp
file.
2015-12-20 16:54:34 +02:00
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
danicampora
e4404fbef0
cc3200: Unmount all user file systems after a soft reset.
2015-11-16 23:43:47 +01:00
Paul Sokolovsky
772f0b4159
tests/jni: Add test for working with container of List interface.
2015-11-13 01:33:09 +02:00
Henrik Sölver
35e7d9c0f1
stmhal/can: Fix a bug in filter handling.
...
Reported here: http://forum.micropython.org/viewtopic.php?f=2&t=845
2015-11-02 23:09:49 +00:00
Paul Sokolovsky
aee704ebe1
extmod/modure: Make sure that errors in regexps are caught early.
2015-11-01 00:38:22 +03:00
Paul Sokolovsky
0bd3f3291d
tests/base/struct1.py: Add test for repetition counters.
2015-10-31 18:55:31 +03:00
stijn
24b03561bd
tests: Make sure test output has \r\n line-ends when running on Windows
...
This is the case already when using just subprocess.check_output, but in
the special cases (cmdline, meminfo, ...) the carriage return gets lost
during output processing so restore it in the end.
This fixes the micropython/meminfo.py test on Windows.
2015-10-31 14:11:19 +03:00
adminpete
d6201fc4b7
py: In inline asm, vldr and vstr offsets now in bytes not words.
...
As per ARM convention.
2015-10-31 10:50:45 +00:00
danicampora
1950295735
cc3200: Set pin direction first, then value. Fixes #1542 .
2015-10-26 23:26:43 +01:00
Paul Sokolovsky
9a334d41e3
tests/jni: Test for basic object operations.
2015-10-24 01:20:34 +03:00
danicampora
075ca64521
cc3200: Fix UART tests after correcting uart.read() behaviour.
2015-10-21 15:30:57 +02:00
danicampora
1f2daf4304
cc3200: Correct ticks_cpu and ticks_us functions in time module.
2015-10-21 15:30:57 +02:00
Damien George
e693e52442
tests: Disable some tests for pyboard that do not run correctly.
2015-10-20 23:55:50 +01:00
Paul Sokolovsky
acea9352a9
tests/extmod: Add tests for sleep_ms/us(), ticks_ms/us/diff().
...
Simple smoke tests, mostly for coverage. Added to extmod based on the fact
that they're extensions to standard modules.
2015-10-20 01:54:20 +03:00
danicampora
9c72c71c05
cc3200: WLAN class can retrieve the existing instance.
2015-10-19 21:17:15 +02:00
danicampora
f4c50f1cfc
tests/wipy: Make WLAN test more stable.
2015-10-19 21:17:15 +02:00
danicampora
ae70e98ed4
cc3200: Fix time.ticks_* functions.
2015-10-19 21:17:15 +02:00
danicampora
36ae417c9f
docs: Add wipy and network.server documentation.
2015-10-19 21:17:15 +02:00
danicampora
2e0cd20a1d
cc3200: Refactor network module to make the server a propper object.
2015-10-19 21:17:15 +02:00
danicampora
d8137178bb
cc3200: Create wipy module, remove HeartBeat class.
...
The heartbeat is now controllable via a single function within the
wipy module.
2015-10-19 21:17:15 +02:00