Damien George
d87c6b6768
tests/basics/string_join: Add more tests for string concatenation.
8 years ago
Damien George
c889f01b8d
tests/cmdline/cmd_parsetree: Update to work with changes to grammar.
8 years ago
Damien George
0ec957d7c5
tests/cmdline: Update cmd_parsetree test for changes to grammar order.
8 years ago
Damien George
7839b8b827
tests/micropython/heapalloc_iter: Add tests for contains and unpack.
8 years ago
Damien George
019048a6dc
tests/micropython: Add test for iterating with the heap locked.
8 years ago
Damien George
86b3db9cd0
tests/cmdline/cmd_showbc: Update to work with recent changes.
8 years ago
Damien George
861b001783
tests/cmdline: Update tests to pass with latest changes to bytecode.
8 years ago
Damien George
f4df3aaa72
py: Allow bytecode/native to put iter_buf on stack for simple for loops.
So that the "for x in it: ..." statement can now work without using the
heap (so long as the iterator argument fits in an iter_buf structure).
9 years ago
Paul Sokolovsky
f980c70997
tests/basic/: Make various tests skippable.
To run the testsuite on small ports.
8 years ago
Paul Sokolovsky
b737c9cbc8
tests/gen_yield_from_close: Use range() instead of reversed().
As a "more basic" builtin iterator, present even in smaller ports.
8 years ago
Damien George
06a12ada48
tests/thread: Add stress-test for creating many threads.
8 years ago
Damien George
2847d7431d
tests/thread: Replace busy waiting loops with a loop that sleeps.
Depending on the thread scheduler, a busy-wait loop can hog the CPU and
make the tests very slow. So convert such loops to loops that have an
explicit sleep, allowing the worker threads to do their job.
8 years ago
Paul Sokolovsky
f2d732f459
tests/extmod: Make tests skippable.
8 years ago
Paul Sokolovsky
7bb146350e
tests/dict_fromkeys: Revert to use reversed() to run in native codegen mode.
8 years ago
Paul Sokolovsky
83623b2fde
tests/basic/[a-f]*: Make skippable.
For small ports which don't have all features enabled.
8 years ago
Paul Sokolovsky
d61ce32022
tests/builtin_dir: The most expected thing in sys is exit, test for it.
8 years ago
Paul Sokolovsky
800b163cd8
tests/comprehension1, containment: Split set tests to separate files.
To make skippable.
8 years ago
Paul Sokolovsky
ce2e0eeb7b
tests/run-tests: Allow to skip tests using async/await keywords.
8 years ago
stijn
c6fd9ba4f3
tests: Add option to not clear MICROPYPATH when running tests
This allows using the test runner for other scenarios than just
testing uPy itself.
The principle of comparing either to CPython or else to a .exp
file is really handy but to be able to test custom modules not
built into micropython.exe one needs to be able to specify the
module search path a.k.a MICROPYPATH.
10 years ago
Damien George
e08395a35c
tests/misc: Add test for line number printing with large bytecode chunk.
8 years ago
dmazzella
18e6569166
py/objtype: Implement __delattr__ and __setattr__.
This patch implements support for class methods __delattr__ and __setattr__
for customising attribute access. It is controlled by the config option
MICROPY_PY_DELATTR_SETATTR and is disabled by default.
8 years ago
Damien George
d3bb3e38df
tests/pyb: Adjust tests so they can run on PYB and PYBLITE.
A few tests still fail on PYBLITE, and that's due to differences in the
available peripheral block numbers on the different MCUs (eg I2C(2)
exists on one, but it's I2C(3) on the other).
8 years ago
Damien George
27c149efe0
stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.
This new function controls what happens on a hard-fault:
- debugging disabled: board will do a reset
- debugging enabled: board will print registers and stack and flash LEDs
The default is disabled, ie to do a reset. This is different to previous
behaviour which flashed the LEDs and waited indefinitely.
8 years ago
Paul Sokolovsky
d5e9ab6e61
extmod/machine_pulse: Make time_pulse_us() not throw exceptions.
machine.time_pulse_us() is intended to provide very fine timing, including
while working with signal bursts, where each transition is tracked in row.
Throwing and handling an exception may take too much time and "signal loss".
So instead, in case of a timeout, just return negative value. Cases of
timeout while waiting for initial signal stabilization, and during actual
timing, are recognized.
The documentation is updated accordingly, and rewritten somewhat to clarify
the function behavior.
8 years ago
Damien George
84fb292cd5
tests/basics/string_format_modulo: Add more tests for dict formatting.
8 years ago
Paul Sokolovsky
87882e1708
tests: Split tests for 2- and 3-arg pow().
8 years ago
Nicko van Someren
df0117c8ae
py: Added optimised support for 3-argument calls to builtin.pow()
Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
8 years ago
Damien George
8a39e18f5f
tests/float: Add tests for zero to a negative power.
8 years ago
Damien George
05c70fdfba
tests/basics/set_binop: Add tests for inplace set operations.
8 years ago
Paul Sokolovsky
b32880bd51
tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
8 years ago
Damien George
28185bb81b
tests/thread: Fix stack size test so tests run reliably on baremetal.
8 years ago
Damien George
bebb3a6160
tests/thread: Make thread_exc2 runable on baremetal.
8 years ago
Paul Sokolovsky
33b8e65bc0
tests/basics/zip: Make skippable.
8 years ago
Paul Sokolovsky
aee723ed4c
tests/run-tests: Skip frozenset tests if set literal syntax is not available.
8 years ago
Damien George
a0c729681f
tests/extmod/vfs_fat_ramdisk: Make it work on pyboard.
8 years ago
Damien George
b9bfaa349a
tests/extmod/vfs_fat: Update tests to work with new VFS sub-system.
The vfs_fat_fsusermount test is no longer relevant so has been removed.
8 years ago
Damien George
94d87fbb30
test/extmod: Update vfs_fat tests for new OO FatFs library.
The new version of FatFs requires a minimum of 50 blocks on the device.
Also, some tests no longer make sense with an OO vfs.
8 years ago
Paul Sokolovsky
9ffc3ae0e7
tests/heapalloc_str: Test for alloc-free string operations.
Starts with concatenation with an empty string.
8 years ago
Damien George
221f88d1f3
tests/extmod: Add test for ure debug printing when compiling a regex.
8 years ago
Damien George
bf51200bc1
tests/extmod/framebuf1: Fix test for framebuf invalid constructor.
8 years ago
Oleg Korsak
406fb3cb60
tests/extmod/framebuf4: Add tests for GS4_HMSB framebuf format.
8 years ago
Oleg Korsak
fd99690f18
extmod/modframebuf: Add GS4_HMSB format.
8 years ago
stijn
533129f835
tests: Make sure special tests can be skipped as well.
Fixes #2806 .
8 years ago
Damien George
20fc620327
tests/basics/builtin_help: Add test for help('modules').
8 years ago
Damien George
1864f90e9a
tests: Add test for builtin help function.
8 years ago
Paul Sokolovsky
bd3dd9296b
tests/heapalloc_int_from_bytes: Test that int.from_bytes() can work w/o alloc.
For a small number of bytes, it's expected to return a small int without
allocation.
8 years ago
Paul Sokolovsky
3b09dca046
tests: Add test for int.from_bytes() for arbitrary-precision integer.
This test works only for MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_MPZ
and needs a way of skipping in other cases.
8 years ago
Damien George
1639200e57
tests/basics: Add test for assignment of attribute to bound method.
8 years ago
Damien George
7314ebae8a
tests/misc/non_compliant: Add test for inability to assign func attrs.
8 years ago
Damien George
fb5838041b
tests/micropython/opt_level: Add test for opt_level 3.
8 years ago