aboutsummaryrefslogtreecommitdiff
path: root/tests/basics
AgeCommit message (Collapse)Author
2015-06-24tests: Adapt basics/memoryerror.py for ports with lower heap sizes.Daniel Campora
2015-06-20py: Use a wrapper to explicitly check self argument of builtin methods.Damien George
Previous to this patch a call such as list.append(1, 2) would lead to a seg fault. This is because list.append is a builtin method and the first argument to such methods is always assumed to have the correct type. Now, when a builtin method is extracted like this it is wrapped in a checker object which checks the the type of the first argument before calling the builtin function. This feature is contrelled by MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG and is enabled by default. See issue #1216.
2015-06-13py: Implement divmod for mpz bignum.Damien George
2015-05-12tests: Add further tests for class defining __hash__.Damien George
2015-05-12py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.Damien George
Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as the operator argument. Hashing for int, str and bytes still go via fast-path in mp_unary_op since they are the most common objects which need to be hashed. This lead to quite a bit of code cleanup, and should be more efficient if anything. It saves 176 bytes code space on Thumb2, and 360 bytes on x86. The only loss is that the error message "unhashable type" is now the more generic "unsupported type for __hash__".
2015-05-11vm: Properly handle StopIteration raised in user instance iterator.Paul Sokolovsky
I.e. in bytecode Python functions.
2015-05-10py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION.Paul Sokolovsky
Testing for incorrect value led to premature termination of generator containing yield from for such iterator (e.g. "yield from [1, 2]").
2015-05-06py: Fix naming of function arguments when function is a closure.Damien George
Addresses issue #1226.
2015-05-05obj: Handle user instance hash based on Python adhoc rules.Paul Sokolovsky
User instances are hashable by default (using __hash__ inherited from "object"). But if __eq__ is defined and __hash__ not defined in particular class, instance is not hashable.
2015-05-04modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky
2015-05-04py: Check that arg to object.__new__ is a user-defined type.Damien George
Addresses issue #1203.
2015-04-25py: Support conversion of bignum to bytes.Damien George
This gets int.to_bytes working for bignum, and also struct.pack with 'q' and 'Q' args on 32-bit machines. Addresses issue #1155.
2015-04-22tests: Add tests for attrtuple, and for more corner cases.Damien George
2015-04-19py: Fix builtin ord so that it can handle bytes values >= 0x80.Damien George
Addresses issue #1188.
2015-04-16tests: Convert line endings in fun_name.py from CRLF to LF.Damien George
2015-04-16objarray: Support assignment of bytes to bytearray slice.Paul Sokolovsky
2015-04-12objstr: split(None): Fix whitespace properly.Paul Sokolovsky
2015-04-05tests: Add some more tests to improve code coverage of corner cases.Damien George
2015-04-04tests: Add tests to exercise lexer; and some more complex number tests.Damien George
2015-04-04tests: Add missing tests for builtins, and many other things.Damien George
2015-04-04tests: Add test for str.splitlines().Paul Sokolovsky
2015-03-28tests/class_descriptor.py: Fix line-endings (were CRLF).Paul Sokolovsky
2015-03-26py: Add optional support for descriptors' __get__ and __set__ methods.stijn
Disabled by default. Enabled on unix and windows ports.
2015-03-25tests: Skip some new tests when testing native emitter.Damien George
2015-03-25tests: Add tests for SyntaxError, TypeError, and other missing things.Damien George
This is intended to improve coverage of the test suite.
2015-03-20py: Allow retrieving a function's __name__.stijn
Disabled by default. Enabled on unix and stmhal ports.
2015-03-20tests: Add basic test for OrderedDict.Paul Sokolovsky
Mostly to have coverage of newly added code in map.c.
2015-03-14py: Fix builtin abs so it works for bools and bignum.Damien George
2015-03-14tests: Add some more tests for bytes, bignum, string and ujson.Damien George
2015-03-12tests: Add tests for things that are not already tested.Damien George
The aim here is to improve coverage of the code.
2015-03-11py: Add support for start/stop/step attributes of builtin range object.Peter D. Gray
2015-03-03tests: Add tests for boundmeth; and bignum cmp, unary, float, error.Damien George
2015-03-02tests: Add basics test for gc module.Damien George
2015-03-02tests: Use range as iterable instead of list comprehension.Damien George
So that navite emitter passes (comprehensions use yield which is not yet supported by native emitter).
2015-03-02tests: Add tests for builtins: all, any, sum, abs.Damien George
2015-03-02tests: Add tests for op special meths, ubinascii, complex.Damien George
2015-02-27tests: Add test for array slice assignment.Paul Sokolovsky
2015-02-15tests: Remove obsolete test; don't use fp in micropython/ tests.Damien George
2015-02-15py: Simplify and remove redundant code for __iter__ method lookup.Damien George
2015-02-14py: Add setattr builtin.stijn
2015-02-09py: Allow subclass of native object to delegate to the native buffer_p.Damien George
Addresses issue #1109.
2015-02-09objstr: Fix bytes creation from array of long ints.Paul Sokolovsky
2015-02-08py: Parse big-int/float/imag constants directly in parser.Damien George
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
2015-02-02py: Make list.sort keep stack usage within O(log(N)) bound.Damien George
Also fix list.sort so it works with user-defined types, and parse the keyword arguments properly. Addresses issue #338.
2015-01-30py: Convert CR to LF and CR LF to LF in lexer.Damien George
Only noticeable difference is how newlines are encoded in triple-quoted strings. The behaviour now matches CPython3.
2015-01-29tests: Add some tests to improve coverage.Damien George
2015-01-29tests: Add some tests to improve coverage.Damien George
Used gcov to find some parts of vm.c, runtime.c, obj.c that were not covered by any tests. Still need to use gcov more thoroughly.
2015-01-28tests: Add testcase for bytes() on values in range 128-255.Paul Sokolovsky
2015-01-27py: Fix comparison of minus-zero long int.Damien George
2015-01-21py: Implement __reversed__ slot.Damien George
Addresses issue #1073.