Paul Sokolovsky
a1a261d8e8
tests/recursive_iternext: Clang/Linux is even more stack-frugal than MacOS.
9 years ago
Damien George
97ce5d1d77
tests/pyb/rtc: Make RTC test on pyboard more reliable by calling init().
9 years ago
Damien George
7d60a97914
tests/misc/recursive_iternext: Provide more fine-grained selection of N.
To work on a variety of ports the selection of N is very specific.
9 years ago
Damien George
ddadbaed06
tests/misc/recursive_iternext.py: Increase depth N from 1000 to 2000.
This makes the test reliably overflow the recursion limit (which is the
correct behaviour) on Mac OS X.
9 years ago
Paul Sokolovsky
f0eea1fdf9
tests/extmod/vfs_fat_ramdisk: Add testcases for chdir(), getcwd().
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
5ab98d5c41
stmhal: Convert to use internal errno symbols; enable uerrno module.
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
Henrik Sölver
c4587e2426
stmhal/can: Allow to get existing CAN obj if constructed without args.
Initialisation of CAN objects should now behave as other peripheral
objects.
Fixes issue #2001 .
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
5ec11f565b
tests/run-tests: Factor out list supported external boards.
To get consistent error messages, etc.
9 years ago
Paul Sokolovsky
566d8f1d7e
tests: Make "io" modules fixes for CPython compatibility.
Previously, "import _io" worked on both CPython and MicroPython (essentially
by a chance on CPython, as there's not guarantee that its contents will stay
the same across versions), but as the module was renamed to uio, need to use
more robust import sequence for compatibility.
9 years ago
Paul Sokolovsky
8c35f3979c
tests: Update for _io/_collections module having been renamed.
9 years ago
Paul Sokolovsky
df06e34175
tests/run-bench-tests: Process tests in alphabetical order.
9 years ago
Paul Sokolovsky
3c2e40b008
tests/run-tests: Add gen_yield_from_stopped to skipped for --emit=native.
Just as the rest of generator tests, which aren't yet supoorted for
native.
9 years ago
Paul Sokolovsky
0ea2108f1c
tests: Add testcase for yielding from a stopped generator.
9 years ago
Damien George
07615d9f7e
tests/extmod: Move split-on-empty-match tests to a separate test file.
And provide an expected-output file because these tests have a different
behaviour under CPython.
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
c2a519bab9
tests: Skip async tests for native emitter.
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
2c915e1ae6
py: Implement basic with support in native emitter.
9 years ago
Damien George
e1e7657277
py/formatfloat: Fix further cases of buffer overflow in formatting.
Includes extensive test cases to catch hopefully all cases where
buffer might overflow.
9 years ago
Paul Sokolovsky
88f60de914
tests: Add test for io.BufferedWriter.
9 years ago
Damien George
da161fd9f0
extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types.
9 years ago
Damien George
99146ea444
tests/io: Remove "testfile" at end of open_plus test.
9 years ago
Damien George
664f03f466
tests: Add a test for argument passing to inline-asm functions.
9 years ago
Damien George
157056ecdf
tests: Add new subdir "stress/" specifically for stress tests.
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
9996adc37d
tests/run-tests: Add cmd line option "--heapsize".
This allows you to specify the heapsize that unix will use when running
the test suite, eg: ./run-tests --heapsize 16k
9 years ago
Damien George
cea6cf8a5e
py/formatfloat: Fix buffer overflow when formatting tiny numbers.
9 years ago
Damien George
77f85db41e
py/objarray: Fix array slice assignment when array is reallocated.
Addresses issue #1898 .
9 years ago
Damien George
f0e2d13fd2
tests/run-tests: Simplify handling of newline in output from tests.
Now, all output has newlines converted to \n, regardless of port or
platform.
9 years ago
Damien George
d964873e56
tests/run-tests: Fix logic when selecting test-dirs for a given target.
9 years ago
Paul Sokolovsky
b86c20676e
tests/recursive_iternext.py: Make low-heap friendly.
9 years ago
Paul Sokolovsky
419bb26ddc
tests/print_exception: Use exception which prints the same regardless of config.
NameError may either include offending name or not. Unfortunately, this
change makes test float-dependent. And using integer division leads to
different error message than CPython.
9 years ago
Paul Sokolovsky
d973c1bc12
test/string_format_fp30: Variant of string_format for 30-bit stuffed float.
9 years ago
Paul Sokolovsky
50e0a7b9d4
test/float2int_fp30: Variant of float2int for 30-bit stuffed float.
9 years ago
Damien George
fbb3c190f9
tests: Remove commented out tests so test script is not too big.
9 years ago
Damien George
14848ffa12
tests: Reduce large object allocations so tests can run with small heap.
9 years ago