summaryrefslogtreecommitdiffstatshomepage
path: root/tests
Commit message (Collapse)AuthorAge
* tests: Add test for exception matching of a tuple of exceptions.Damien George2014-09-25
|
* py: Make native emitter handle multi-compare and not/is not/not in ops.Damien George2014-09-23
|
* tests: Fix uctypes tests to run on 64bit arch; enable more native tests.Damien George2014-09-23
|
* extmod, ujson: Add test and comment for loads.Damien George2014-09-21
|
* py: Add native json printing using existing print framework.Damien George2014-09-17
| | | | | Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
* py: Fix build error when float disabled; add test for divmod.Damien George2014-09-13
|
* py: Implement divmod, % and proper // for floating point.Damien George2014-09-13
| | | | Tested and working on unix and pyboard.
* tests: Enable misc tests on pyboard; output 4 sig figs in rge_sm.Damien George2014-09-06
|
* unix: Don't use -Wno-error=cpp or #warning; fix strict alias warning.Damien George2014-09-06
| | | | | | | | | | 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.
* py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch.Damien George2014-09-06
| | | | | | | | | | | | | | | | 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.
* py: Fix 2 bugs in native emitter: jump_or_pop and stack settling.Damien George2014-08-29
| | | | Addresses issue #838.
* tests: Add option to run-tests to enable native emitter.Damien George2014-08-29
|
* Make int(b'123') work properly.Dave Hylands2014-08-26
|
* py: Add dispatch for user defined ==, >, <=, >=.Damien George2014-08-26
| | | | Addresses issue #827.
* tests: Add test for pyb.disable_irq and pyb.enable_irq.Damien George2014-08-25
|
* py: Consolidate min/max functions into one, and add key= argument.Damien George2014-08-24
| | | | Addresses issue #811.
* stmhal, modtime: Small changes, reduced code size by around 80 bytes.Damien George2014-08-24
| | | | Also added test for modtime.
* py: Fix bug where GC collected native/viper/asm function data.Damien George2014-08-24
| | | | | | | | Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
* py: Viper can call functions with native types, and raise exceptions.Damien George2014-08-16
|
* tests: Wait for just over 1 sec when testing RTC.Damien George2014-08-16
| | | | | Waiting for 1000ms between seconds of RTC is sometimes too quick. Waiting for 1001ms is enough for the RTC to pass 1 second.
* py: Viper can now store to global.Damien George2014-08-15
|
* py: Fix typing of viper locals; allow default types in annotation.Damien George2014-08-15
|
* py: Allow viper to have type annotations.Damien George2014-08-15
| | | | | | | | | Viper functions can now be annotated with the type of their arguments and return value. Eg: @micropython.viper def f(x:int) -> int: return x + 1
* py: Fix mult by negative number of tuple, list, str, bytes.Damien George2014-08-13
| | | | | | | Multiplication of a tuple, list, str or bytes now yields an empty sequence (instead of crashing). Addresses issue #799 Also added ability to mult bytes on LHS by integer.
* extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.Damien George2014-08-12
|
* tests: Add test for zlibd module.Paul Sokolovsky2014-08-13
|
* py: Improve range: add len, subscr, proper print.Damien George2014-08-12
| | | | | | | | Can now index ranges with integers and slices, and reverse ranges (although reversing is not very efficient). Not sure how useful this stuff is, but gets us closer to having all of Python's builtins.
* py: Implement builtin reversed() function.Damien George2014-08-12
| | | | | | | | reversed function now implemented, and works for tuple, list, str, bytes and user objects with __len__ and __getitem__. Renamed mp_builtin_len to mp_obj_len to make it publically available (eg for reversed).
* objstr: Make sure that bytes are indexed as bytes, not as unicode.Paul Sokolovsky2014-08-11
| | | | Fixes #795.
* objarray: Implement equality testing between arrays and other buffers.Paul Sokolovsky2014-08-10
|
* tests, pyb: Update pin test.Damien George2014-08-08
|
* py: Implement __file__ attribute for modules.Paul Sokolovsky2014-07-28
|
* tests: Add testcase for read by length past EOF.Paul Sokolovsky2014-07-22
| | | | Currently broken for unicode input streams.
* py: Add stream reading of n unicode chars; unicode support by default.Damien George2014-07-19
| | | | | | | | | | | | | With unicode enabled, this patch allows reading a fixed number of characters from text-mode streams; eg file.read(5) will read 5 unicode chars, which can made of more than 5 bytes. For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If there are lots of non-ASCII chars in a stream, then it needs multiple reads of the underlying object. Adds a new test for this case. Enables unicode support by default on unix and stmhal ports.
* test: Add run-tests-exp.sh, script to run testsuite with only sh dependency.Paul Sokolovsky2014-07-13
| | | | | | This script uses expected test results as generated by run-tests --write-exp, and requires only standard unix shell funtionality (no bash). It is useful to run testsuite on embedded systems, where there's no CPython and Bash.
* run-tests: Add option to write CPython's test results to .exp files.Paul Sokolovsky2014-07-12
| | | | Mostly to run testsuite on targets which doesn't have CPython.
* moductypes: Add symbolic constants to specify bitfield position/length.Paul Sokolovsky2014-07-11
|
* moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky2014-07-09
| | | | | But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
* tests: Rename test scripts, changing - to _ for consistency.Damien George2014-07-05
| | | | | | From now on, all new tests must use underscore. Addresses issue #727.
* py: Automatically ake __new__ a staticmethod.Damien George2014-07-05
| | | | Addresses issue #622.
* tests: Write output in byte mode, not text mode.Damien George2014-06-28
| | | | This enables testing unicode and non-unicode implementations.
* Merge branch 'master' into unicodeDamien George2014-06-28
|\ | | | | | | | | Conflicts: py/mpconfig.h
| * py: Add protection against printing too nested or recursive data structures.Paul Sokolovsky2014-06-28
| | | | | | | | With a test which cannot be automatically validated so far.
* | tests: Add basic test for unicode file i/o.Paul Sokolovsky2014-06-27
| |
* | tests: Test for explicit start/end args to str methods for unicode.Paul Sokolovsky2014-06-27
| |
* | tests: Add tests for unicode find()/rfind()/index().Paul Sokolovsky2014-06-27
| |
* | tests: Add test for unicode string iteration.Paul Sokolovsky2014-06-27
| |
* | tests: Add unicode test.Chris Angelico2014-06-27
|/
* tests: Add test for catching infinite function recursion.Paul Sokolovsky2014-06-27
| | | | Put into misc/ to not complicate life for builds with check disabled.
* modstruct: Fix alignment handling issues.Paul Sokolovsky2014-06-25
| | | | Also, factor out mp_binary_get_int() function.