Damien George
30bca45e1a
tests/basics: Add test for logical constant folding.
8 years ago
Fabio Utzig
8908e505ce
py/sequence: Fix reverse slicing of lists.
8 years ago
Alex March
964fb2450e
tests/basics/gc1: Garbage collector threshold() coverage.
8 years ago
Damien George
25c6fc731b
tests/basics: Add test for builtin "delattr".
8 years ago
Damien George
bc5b896f24
tests/basics/builtin_slice: Add test for "slice" builtin name.
8 years ago
Damien George
6caca3259f
tests: Add test to print full KeyError exc from failed dict lookup.
8 years ago
Damien George
e9404e5f5f
tests: Improve coverage of array, range, dict, slice, exc, unicode.
8 years ago
Damien George
5e22afce41
tests: Improve test coverage of py/compile.c.
8 years ago
Damien George
82af4d6749
tests: Improve coverage of struct with test for non-compliant behaviour.
8 years ago
Damien George
9f72a14920
tests/basics: Add test for printing OSError when errno is unknown.
8 years ago
Damien George
17b4509564
tests/basics: Add test constructing a set from a non-trivial expression.
8 years ago
Damien George
6cf2a3966e
tests/basics: Add further tests for nonlocal scoping and closures.
8 years ago
Damien George
b32c01b748
py/compile: Fix async-for/async-with to work with simpler exc on stack.
There is now just the exception instance on the stack when an exception is
raised, not the full (type, exc, traceback).
8 years ago
Damien George
443cc0114d
tests/basics: Add test for set.difference_update with arg being itself.
8 years ago
Damien George
2c7716fed0
py/objset: Ensure that use of frozenset.update raises an exception.
8 years ago
Damien George
3f0c1c2452
tests/basics: Add test case for overflowing Py stack in try-finally.
8 years ago
Paul Sokolovsky
60592fd23c
tests/array1: Add tests for "l", "L" array types to improve coverage.
8 years ago
Paul Sokolovsky
b85bcd671c
tests/struct1: Test "l" specifier to improve coverage.
8 years ago
Damien George
2b7c4a1878
tests/basics: Add errno1 test, to check basics of uerrno module.
8 years ago
Damien George
bb19e7b94b
tests/basics/special_methods: Enable tests for extra special methods.
These additional special methods are enabled on most ports so we can test
them in this test.
8 years ago
rguillon
ed6a1ada24
tests/basics: Add a test file for overriding special methods.
8 years ago
Damien George
095e43a9a5
py/sequence: Allow to use bignums as indices in slice objects.
See issue #2264 .
8 years ago
Damien George
f6a8e84a25
tests/basics: Add test for break from within try within a for-loop.
8 years ago
Damien George
d5f42c9daf
tests/basics: Add more list tests to improve coverage testing.
8 years ago
Damien George
3c82d1d34b
tests/basics: Add more tuple tests to improve coverage testing.
8 years ago
Paul Sokolovsky
8897dcb2a1
tests/basics: bytes/str.partition/rpartition are now optional.
Skip tests if not available.
8 years ago
Paul Sokolovsky
6af90b2972
py/objstrunicode: str_index_to_ptr: Should handle bytes too.
There's single str_index_to_ptr() function, called for both bytes and
unicode objects, so should handle each properly.
8 years ago
Paul Sokolovsky
b652ee705b
tests/bytes_compare: Rework test for bytes <-> str comparison.
This may produce a warning, depending on MicroPython configuration.
8 years ago
Mark Anthony Palomer
deaf0712aa
tests: Add testcase for OrderedDict equality.
There's a need for .exp file because CPython renders OrderedDict's as:
OrderedDict([('b', 2)])
while MicroPython as:
OrderedDict({'b': 2})
9 years ago
Damien George
715ee9d925
py/modstruct: Allow to have "0s" in struct format.
9 years ago
Antonin ENFRUN
ca41dc2750
py/objnamedtuple: Allow passing field names as a tuple.
So the documentation's example works. Besides, a tuple can be more
memory efficient.
9 years ago
Paul Sokolovsky
53bac8e869
tests: Add testcase for str.center().
9 years ago
Paul Sokolovsky
719f8c044a
tests/struct1: Add testcase for an unknown type char.
9 years ago
Damien George
1e2f829293
tests/basics/string_splitlines: Reinstate feature test for splitlines.
9 years ago
Damien George
cc80c4dd59
py/objstr: Make dedicated splitlines function, supporting diff newlines.
It now supports \n, \r and \r\n as newline separators.
Adds 56 bytes to stmhal and 80 bytes to unix x86-64.
Fixes issue #1689 .
9 years ago
Damien George
65402ab1ec
py/mpz: Do Python style division/modulo within bignum divmod routine.
This patch consolidates the Python logic for division/modulo to one place
within the bignum code.
9 years ago
Damien George
dc3faea040
py/mpz: Fix bug with overflowing C-shift in division routine.
When DIG_SIZE=32, a uint32_t is used to store limbs, and no normalisation
is needed because the MSB is already set, then there will be left and
right shifts (in C) by 32 of a 32-bit variable, leading to undefined
behaviour. This patch fixes this bug.
9 years ago
Damien George
9e47c145c7
tests: Disable memoryview tests that overflow int conversion.
They fail on builds with 32-bit word size.
9 years ago
Damien George
470c429ee1
py/runtime: Properly handle passing user mappings to ** keyword args.
9 years ago
Damien George
12dd8df375
py/objstr: Binary type of str/bytes for buffer protocol is 'B'.
The type is an unsigned 8-bit value, since bytes objects are exactly
that. And it's also sensible for unicode strings to return unsigned
values when accessed in a byte-wise manner (CPython does not allow this).
9 years ago
Paul Sokolovsky
8c35f3979c
tests: Update for _io/_collections module having been renamed.
9 years ago
Paul Sokolovsky
0ea2108f1c
tests: Add testcase for yielding from a stopped generator.
9 years ago
Damien George
fea40ad468
py: Fix bug passing a string as a keyword arg in a dict.
Addresses issue #1998 .
9 years ago
Damien George
2c883c5ab7
tests: Fix dict1.py so it doesn't rely on the order of dict elems.
9 years ago
Damien George
7f7e247545
tests: Add .exp files for async tests, so they can run with Python 3.4.
9 years ago
Damien George
c33df193bf
tests: Add 6 tests for async await/for/with.
9 years ago
Damien George
04d5e644fc
py/objarray: Fix array.append so it doesn't extend if append fails.
Addresses issue #1965 .
9 years ago
Damien George
ab69ed7dac
tests: Split large tests into smaller files, to run with a small heap.
All tests in basics/ directory can now run and pass using 64-bit unix
port with only a 16k heap (./run-tests --heapsize 16k). Tests in this
directory should remain small so they can be used for ports with a
small heap.
9 years ago
Damien George
77f85db41e
py/objarray: Fix array slice assignment when array is reallocated.
Addresses issue #1898 .
9 years ago
Damien George
fbb3c190f9
tests: Remove commented out tests so test script is not too big.
9 years ago