aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-11-21py: Add support for float/double arrays in array module.Damien George
Addresses issue #981.
2014-11-19Set PYTHONIOENCODING='utf-8' so that unicode tests can pass on CPython onblmorris
systems where another encoding is set in the locale
2014-11-16py: Make stream seek correctly check for ioctl fn; add seek for textio.Damien George
2014-11-17tests: Add test for file.seek().Paul Sokolovsky
2014-11-15stmhal: Fix HAL error raising; make test for it.Damien George
Addresses issue #968.
2014-11-15tests: Add test for hash of user defined class.Damien George
2014-11-05py: Allow +, in, and compare ops between bytes and bytearray/array.Damien George
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.
2014-11-03py: Fix builtin callable so it checks user-defined instances correctly.Damien George
Addresses issue #953.
2014-11-02py: Fix bug with right-shifting small ints by large amounts.Paul Sokolovsky
Undefined behavior in C, needs explicit check.
2014-10-31tests: Add heapalloc.py.exp, since CPython can't generate it.Damien George
2014-10-31py: Make gc.enable/disable just control auto-GC; alloc is still allowed.Damien George
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.
2014-10-31py: Add builtin round function.Damien George
Addresses issue #934.
2014-10-30stmhal: Improve CAN print function.Damien George
2014-10-30tests: Added and adapted CAN tests for extended messagesHenrik Sölver
2014-10-31objstr: Allow to convert any buffer proto object to str.Paul Sokolovsky
Original motivation is to support converting bytearrays, but easier to just support buffer protocol at all.
2014-10-30moductypes: Add test for accessing UINT8 array.Paul Sokolovsky
2014-10-30moductypes: Make sure we can apply .sizeof() to all aggregate types.Paul Sokolovsky
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.
2014-10-26tests: Get builtin_compile to skin properly on pyboard.Damien George
2014-10-26stmhal: Change SPI phase spec to 0,1 to match standard conventions.Damien George
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.
2014-10-26py: Fix memoryview referencing so it retains ptr to original buffer.Damien George
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.
2014-10-25tests: Add test for compile builtin.Damien George
2014-10-23stream: Add optional 2nd "length" arg to .readinto() - extension to CPython.Paul Sokolovsky
While extension to file.readinto() definition of CPython, the additional arg is similar to what in CPython available in socket.recv_into().
2014-10-23py: Add builtin memoryview object (mostly using array code).Damien George
2014-10-22extmod: Add uheapq module.Damien George
2014-10-22py: Fix smallint modulo with negative arguments.Damien George
Addresses issue #927.
2014-10-22py: Remove unused and unneeded SystemError exception.Damien George
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-21stmhal: Overhaul UART class to use read/write, and improve it.Damien George
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-21Use mode/encoding kwargs in io and unicode testsstijn
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-19py: Partially fix viper multi-comparison; add test for it.Damien George
2014-10-18unix, stmhal: Implement file.readinto() method.Paul Sokolovsky
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-17modure: Update to re1.5 v0.6.1, fixed and extended character class support.Paul Sokolovsky
2014-10-17py: Add more compiler optimisations for constant if/while conditions.Damien George
2014-10-17tests: Add test for nested while with exc and break.Damien George
2014-10-16objclosure: Fix printing of generator closures.Paul Sokolovsky
The code previously assumed that only functions can be closed over.
2014-10-15modure: Update to re1.5 v0.6, support for char sets/classes ([a-c]).Paul Sokolovsky
2014-10-12Merge pull request #904 from pfalcon/moduzlibDamien George
Module "uzlib" - based on similarly named library
2014-10-13moduzlib: Integrate into the system.Paul Sokolovsky
2014-10-12py: Implement native load for viper.Damien George
Viper can now do: ptr8(buf)[0], which loads a byte from a buffer using machine instructions.
2014-10-12py: Implement and,or,xor native ops for viper.Damien George
2014-10-11modure: Basic tests.Paul Sokolovsky
2014-10-06tests: Skip ffi_float.py if module ffi is not available.Paul Sokolovsky
2014-10-06tests: Add missing "import sys".Paul Sokolovsky
2014-10-06tests: Force skip of LE test on non-LE arch; improve run-tests-exp.sh.Damien George
2014-10-06tests: Make run-tests-exp.sh skip tests that fail due to invalid decorator.Damien George
Should address issue #856.
2014-10-05tests: Add check for micropython.native and then skip relevant tests.Damien George
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-05py: Make compiler return a proper exception on SyntaxError.Damien George
2014-10-05tests: Make printing of floats hopefully more portable.Damien George
2014-10-05Exclude some tests which always fail on windowsstijn
2014-10-02tests: Add simple CAN test.Damien George
2014-10-01Enable device keyword option when running pyboard.py --tests and run-tests ↵blmorris
--pyboard