aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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
2014-09-30py: Remove IOError since it's deprecated; use OSError instead.Damien George
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.
2014-09-29py: Fix viper store on x86; add tests for viper ptr16.Damien George
2014-09-29py: Add casting to viper; add native mem stores to viper.Damien George
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.
2014-09-29tests: Add tests for viper binary operations.Damien George
2014-09-29py: Allow viper to use ints as direct conditionals in jumps.Damien George
Allows things like: if 1: ...
2014-09-25py: Simplify JSON str printing (while still conforming to JSON spec).Damien George
The JSON specs are relatively flexible and allow us to use one function to print strings, be they ascii, bytes or utf-8 encoded.
2014-09-25Change allows tests/unix/ffi_float.py to pass on OSXblmorris
2014-09-25tests: Add test for exception matching of a tuple of exceptions.Damien George
2014-09-23py: Make native emitter handle multi-compare and not/is not/not in ops.Damien George
2014-09-23tests: Fix uctypes tests to run on 64bit arch; enable more native tests.Damien George
2014-09-21extmod, ujson: Add test and comment for loads.Damien George
2014-09-17py: Add native json printing using existing print framework.Damien George
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
2014-09-13py: Fix build error when float disabled; add test for divmod.Damien George
2014-09-13py: Implement divmod, % and proper // for floating point.Damien George
Tested and working on unix and pyboard.
2014-09-06tests: Enable misc tests on pyboard; output 4 sig figs in rge_sm.Damien George
2014-09-06unix: Don't use -Wno-error=cpp or #warning; fix strict alias warning.Damien George
For the sake of older versions of gcc (and other compilers), don't use the #warning CPP directive, nor the -Wno-error=cpp option. Also, fix a strict alias warning in modffi.c for older compilers, and add a test for ffi module. Addresses issue #847.
2014-09-06py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.Damien George
Previously, mpz was restricted to using at most 15 bits in each digit, where a digit was a uint16_t. With this patch, mpz can use all 16 bits in the uint16_t (improvement to mpn_div was required). This gives small inprovements in speed and RAM usage. It also yields savings in ROM code size because all of the digit masking operations become no-ops. Also, mpz can now use a uint32_t as the digit type, and hence use 32 bits per digit. This will give decent improvements in mpz speed on 64-bit machines. Test for big integer division added.
2014-08-29py: Fix 2 bugs in native emitter: jump_or_pop and stack settling.Damien George
Addresses issue #838.
2014-08-29tests: Add option to run-tests to enable native emitter.Damien George
2014-08-26Make int(b'123') work properly.Dave Hylands
2014-08-26py: Add dispatch for user defined ==, >, <=, >=.Damien George
Addresses issue #827.
2014-08-25tests: Add test for pyb.disable_irq and pyb.enable_irq.Damien George
2014-08-24py: Consolidate min/max functions into one, and add key= argument.Damien George
Addresses issue #811.