summaryrefslogtreecommitdiffstatshomepage
path: root/tests
Commit message (Collapse)AuthorAge
* py: Allow +, in, and compare ops between bytes and bytearray/array.Damien George2014-11-05
| | | | | | Eg b"123" + bytearray(2) now works. This patch actually decreases code size while adding functionality: 32-bit unix down by 128 bytes, stmhal down by 84 bytes.
* py: Fix builtin callable so it checks user-defined instances correctly.Damien George2014-11-03
| | | | Addresses issue #953.
* py: Fix bug with right-shifting small ints by large amounts.Paul Sokolovsky2014-11-02
| | | | Undefined behavior in C, needs explicit check.
* tests: Add heapalloc.py.exp, since CPython can't generate it.Damien George2014-10-31
|
* py: Make gc.enable/disable just control auto-GC; alloc is still allowed.Damien George2014-10-31
| | | | | | gc.enable/disable are now the same as CPython: they just control whether automatic garbage collection is enabled or not. If disabled, you can still allocate heap memory, and initiate a manual collection.
* py: Add builtin round function.Damien George2014-10-31
| | | | Addresses issue #934.
* stmhal: Improve CAN print function.Damien George2014-10-30
|
* tests: Added and adapted CAN tests for extended messagesHenrik Sölver2014-10-30
|
* objstr: Allow to convert any buffer proto object to str.Paul Sokolovsky2014-10-31
| | | | | Original motivation is to support converting bytearrays, but easier to just support buffer protocol at all.
* moductypes: Add test for accessing UINT8 array.Paul Sokolovsky2014-10-30
|
* moductypes: Make sure we can apply .sizeof() to all aggregate types.Paul Sokolovsky2014-10-30
| | | | | | | | | | | | Before, sizeof() could be applied to a structure field only if that field was itself a structure. Now it can be applied to PTR and ARRAY fields too. It's not possible to apply it to scalar fields though, because as soon as scalar field (int or float) is dereferenced, its value is converted into Python int/float value, and all original type info is lost. Moreover, we allow sizeof of type definitions too, and there int is used to represent (scalar) types. So, we have ambiguity what int may be - either dereferenced scalar structure field, or encoded scalar type. So, rather throw an error if user tries to apply sizeof() to int.
* tests: Get builtin_compile to skin properly on pyboard.Damien George2014-10-26
|
* stmhal: Change SPI phase spec to 0,1 to match standard conventions.Damien George2014-10-26
| | | | | | | Was 1 or 2, now 0 or 1 (respectively). 0 means sample MISO on first edge, 1 means sample on second edge. Addresses issue #936.
* py: Fix memoryview referencing so it retains ptr to original buffer.Damien George2014-10-26
| | | | | This way, if original parent object is GC'd, the memoryview still points to the underlying buffer data so that buffer is not GC'd.
* tests: Add test for compile builtin.Damien George2014-10-25
|
* stream: Add optional 2nd "length" arg to .readinto() - extension to CPython.Paul Sokolovsky2014-10-23
| | | | | While extension to file.readinto() definition of CPython, the additional arg is similar to what in CPython available in socket.recv_into().
* py: Add builtin memoryview object (mostly using array code).Damien George2014-10-23
|
* extmod: Add uheapq module.Damien George2014-10-22
|
* py: Fix smallint modulo with negative arguments.Damien George2014-10-22
| | | | Addresses issue #927.
* py: Remove unused and unneeded SystemError exception.Damien George2014-10-22
| | | | | 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.
* stmhal: Overhaul UART class to use read/write, and improve it.v1.3.4Damien George2014-10-21
| | | | | | | | | | | | 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.
* Use mode/encoding kwargs in io and unicode testsstijn2014-10-21
| | | | | | 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
* py: Partially fix viper multi-comparison; add test for it.Damien George2014-10-19
|
* unix, stmhal: Implement file.readinto() method.Paul Sokolovsky2014-10-18
| | | | | | 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.
* modure: Update to re1.5 v0.6.1, fixed and extended character class support.Paul Sokolovsky2014-10-17
|
* py: Add more compiler optimisations for constant if/while conditions.Damien George2014-10-17
|
* tests: Add test for nested while with exc and break.Damien George2014-10-17
|
* objclosure: Fix printing of generator closures.Paul Sokolovsky2014-10-16
| | | | The code previously assumed that only functions can be closed over.
* modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).Paul Sokolovsky2014-10-15
|
* Merge pull request #904 from pfalcon/moduzlibDamien George2014-10-12
|\ | | | | Module "uzlib" - based on similarly named library
| * moduzlib: Integrate into the system.Paul Sokolovsky2014-10-13
| |
* | py: Implement native load for viper.Damien George2014-10-12
|/ | | | | Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using machine instructions.
* py: Implement and,or,xor native ops for viper.Damien George2014-10-12
|
* modure: Basic tests.Paul Sokolovsky2014-10-11
|
* tests: Skip ffi_float.py if module ffi is not available.Paul Sokolovsky2014-10-06
|
* tests: Add missing "import sys".Paul Sokolovsky2014-10-06
|
* tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh.Damien George2014-10-06
|
* tests: Make run-tests-exp.sh skip tests that fail due to invalid decorator.Damien George2014-10-06
| | | | Should address issue #856.
* tests: Add check for micropython.native and then skip relevant tests.Damien George2014-10-05
| | | | | | | | | 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.
* py: Make compiler return a proper exception on SyntaxError.Damien George2014-10-05
|
* tests: Make printing of floats hopefully more portable.Damien George2014-10-05
|
* Exclude some tests which always fail on windowsstijn2014-10-05
|
* tests: Add simple CAN test.Damien George2014-10-02
|
* Enable device keyword option when running pyboard.py --tests and run-tests ↵blmorris2014-10-01
| | | | --pyboard
* py: Remove IOError since it's deprecated; use OSError instead.Damien George2014-09-30
| | | | | | | | | | | In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background.
* py: Fix viper store on x86; add tests for viper ptr16.Damien George2014-09-29
|
* py: Add casting to viper; add native mem stores to viper.Damien George2014-09-29
| | | | | | | | | | Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code.
* tests: Add tests for viper binary operations.Damien George2014-09-29
|
* py: Allow viper to use ints as direct conditionals in jumps.Damien George2014-09-29
| | | | Allows things like: if 1: ...
* py: Simplify JSON str printing (while still conforming to JSON spec).Damien George2014-09-25
| | | | | The JSON specs are relatively flexible and allow us to use one function to print strings, be they ascii, bytes or utf-8 encoded.