aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-08-15py: Viper can now store to global.Damien George
2014-08-15py: Fix typing of viper locals; allow default types in annotation.Damien George
2014-08-15py: Allow viper to have type annotations.Damien George
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
2014-08-13py: Fix mult by negative number of tuple, list, str, bytes.Damien George
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.
2014-08-12extmod: Finish rename of zlib to zlibd; enable zlibd on stmhal.Damien George
2014-08-13tests: Add test for zlibd module.Paul Sokolovsky
2014-08-12py: Improve range: add len, subscr, proper print.Damien George
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.
2014-08-12py: Implement builtin reversed() function.Damien George
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).
2014-08-11objstr: Make sure that bytes are indexed as bytes, not as unicode.Paul Sokolovsky
Fixes #795.
2014-08-10objarray: Implement equality testing between arrays and other buffers.Paul Sokolovsky
2014-08-08tests, pyb: Update pin test.Damien George
2014-07-28py: Implement __file__ attribute for modules.Paul Sokolovsky
2014-07-22tests: Add testcase for read by length past EOF.Paul Sokolovsky
Currently broken for unicode input streams.
2014-07-19py: Add stream reading of n unicode chars; unicode support by default.Damien George
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.
2014-07-13test: Add run-tests-exp.sh, script to run testsuite with only sh dependency.Paul Sokolovsky
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.
2014-07-12run-tests: Add option to write CPython's test results to .exp files.Paul Sokolovsky
Mostly to run testsuite on targets which doesn't have CPython.
2014-07-11moductypes: Add symbolic constants to specify bitfield position/length.Paul Sokolovsky
2014-07-09moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky
But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
2014-07-05tests: Rename test scripts, changing - to _ for consistency.Damien George
From now on, all new tests must use underscore. Addresses issue #727.
2014-07-05py: Automatically ake __new__ a staticmethod.Damien George
Addresses issue #622.
2014-06-28tests: Write output in byte mode, not text mode.Damien George
This enables testing unicode and non-unicode implementations.
2014-06-28Merge branch 'master' into unicodeDamien George
Conflicts: py/mpconfig.h
2014-06-28py: Add protection against printing too nested or recursive data structures.Paul Sokolovsky
With a test which cannot be automatically validated so far.
2014-06-27tests: Add basic test for unicode file i/o.Paul Sokolovsky
2014-06-27tests: Test for explicit start/end args to str methods for unicode.Paul Sokolovsky
2014-06-27tests: Add tests for unicode find()/rfind()/index().Paul Sokolovsky
2014-06-27tests: Add test for unicode string iteration.Paul Sokolovsky
2014-06-27tests: Add unicode test.Chris Angelico
2014-06-27tests: Add test for catching infinite function recursion.Paul Sokolovsky
Put into misc/ to not complicate life for builds with check disabled.
2014-06-25modstruct: Fix alignment handling issues.Paul Sokolovsky
Also, factor out mp_binary_get_int() function.
2014-06-20tests/float/: Skip tests if "math" module is not available.Paul Sokolovsky
2014-06-19bench: Three ways to process a byte buffer.Paul Sokolovsky
2014-06-19bench: Add test for map() vs inplace operations in array-likes.Paul Sokolovsky
map() is 5 times slower. That's mostly because of inefficiency of creating containers from iterables of unknown length (like map()).
2014-06-19bench: Add tests for constructing various containers from iterator.Paul Sokolovsky
Both "bound" (like, length known) and "unbound" (length unknown) are tested. All of list, tuple, bytes, bytesarray offer approximately the same performance, with "unbound" case being 30 times slower.
2014-06-19bench: Add test for function call overhead.Paul Sokolovsky
For a trivial operation, calling a function is 5 times slower than doing operation inline.
2014-06-14objstr: Be 8-bit clean even for repr().Paul Sokolovsky
This will allow roughly the same behavior as Python3 for non-ASCII strings, for example, print("<phrase in non-Latin script>".split()) will print list of words, not weird hex dump (like Python2 behaves). (Of course, that it will print list of words, if there're "words" in that phrase at all, separated by ASCII-compatible whitespace; that surely won't apply to every human language in existence).
2014-06-12py: Rename builtin "io" to "_io".Paul Sokolovsky
Functionality we provide in builtin io module is fairly minimal. Some code, including CPython stdlib, depends on more functionality. So, there's a choice to either implement it in C, or move it _io, and let implement other functionality in Python. 2nd choice is pursued. This setup matches CPython too (_io is builtin, io is Python-level).
2014-06-11tests: Add testcases for "complicated" args to generator functions.Paul Sokolovsky
2014-06-10py: Implement __contains__ special method.Damien George
2014-06-08objtype: Fix passing of class param to inherited classmethods.Paul Sokolovsky
This is getting more and more tangled, but that's old news.
2014-06-08tests: Run 'micropython' tests on pyboard.Damien George
2014-06-08tests: Add more tests for default keyword-only args.Damien George
2014-06-08tests: Fix default arg test.Damien George
2014-06-08py: Make sure getattr() works with non-interned strings (by interning them).Paul Sokolovsky
2014-06-07py: Implement default keyword only args.Damien George
Should finish addressing issue #524.
2014-06-06Merge pull request #667 from Rosuav/testfixesPaul Sokolovsky
A couple of small fixes to run-tests
2014-06-05Fix str.modulo when precision is specified.Dave Hylands
2014-06-06Turn the Travis CI test skipping mechanism into something more genericChris Angelico
2014-06-06Figure out the test_name before using it (significant only to Travis skips)Chris Angelico
2014-06-05py: Raise TypeError when trying to format non-int with %x,%o,%X.Damien George
This behaviour follows Python 3.5 standard (in 3.4 it's a DeprecationWarning which we'd rather make a TypeError).