aboutsummaryrefslogtreecommitdiff
path: root/tests/extmod
AgeCommit message (Collapse)Author
2020-03-18extmod/modlwip: Fix polling of UDP socket so it doesn't return HUP.Damien George
STATE_NEW will return HUP when polled so put active UDP sockets into a new state which is different to STATE_NEW. Fixes issue #5758.
2020-02-21extmod/modframebuf: Allow blit source to be a subclass of FrameBuffer.Jim Mussared
2020-02-11tests/run-tests: Auto-skip extmod/ticks_diff, extmod/time_ms_us tests.Yonatan Goldschmidt
2020-01-22tests/extmod: Add basic machine.Timer test.Damien George
2019-12-27tests/extmod: Split out VfsFat finaliser tests to separate test file.Damien George
It tests independent functionality and may need to be skipped for a given port.
2019-12-13tests/extmod/vfs_lfs_error: Use small ints in seek error test.Damien George
So accessing the seek offset (at the C level) doesn't cause an OverflowError on 32-bit targets.
2019-11-13py/objdict: Support ujson.dump() of OrderedDict objects.Andrew Leech
Following CPython, OrderedDict are dumped with the syntax of dict.
2019-10-31tests/extmod: Add test for ussl when passing in key/cert params.Damien George
2019-10-31extmod/modlwip: Make socket poll return POLLNVAL in case of bad file.Damien George
2019-10-29extmod/vfs: Rename BP_IOCTL_xxx constants to MP_BLOCKDEV_IOCTL_xxx.Damien George
Also rename SEC_COUNT to BLOCK_COUNT and SEC_SIZE to BLOCK_SIZE.
2019-10-29tests/extmod: Add test for blockdev with standard and extended protocol.Damien George
2019-10-29tests/extmod: Add littlefs tests.Damien George
2019-10-18extmod/re1.5: Support escaping within RE classes.Jim Mussared
Fixes issues #3178 and #5220. Tests are added, including all the cases mentioned in both bugs.
2019-08-22tests/extmod: Split json.loads of bytes/bytearray into separate test.Damien George
Because this functionality was introduced in Python 3.6.
2019-08-22extmod/modujson: Support passing bytes/bytearray to json.loads.Damien George
CPython allows this, and it can be useful to reduce the number of memory allocations. Fixes issue #5031.
2019-08-19extmod/modure: Make regex dump-code debugging feature optional.Damien George
Enabled via MICROPY_PY_URE_DEBUG, disabled by default (but enabled on unix coverage build). This is a rarely used feature that costs a lot of code (500-800 bytes flash). Debugging of regular expressions can be done offline with other tools.
2019-07-30py/objdict: Quote non-string types when used as keys in JSON output.Eric Poulsen
JSON requires that keys of objects be strings. CPython will therefore automatically quote simple types (NoneType, bool, int, float) when they are used directly as keys in JSON output. To prevent subtle bugs and emit compliant JSON, MicroPython should at least test for such keys so they aren't silently let through. Then doing the actual quoting is a similar cost to raising an exception, so that's what is implemented by this patch. Fixes issue #4790.
2019-05-14extmod/modujson: Handle parsing of floats with + in the exponent.Damien George
Fixes issue #4780.
2019-05-06extmod/moducryptolib: Add AES-CTR support.Yonatan Goldschmidt
Selectable at compile time via MICROPY_PY_UCRYPTOLIB_CTR. Disabled by default.
2019-04-30tests/ussl_basic: Disable setblocking() calls.Paul Sokolovsky
Now that setblocking() is implemented in modussl_axtls, it calls into the underlying stream object, and io.BytesIO doesn't have setblocking().
2019-04-30extmod/modussl_axtls: Add non-blocking mode support.Paul Sokolovsky
It consists of: 1. "do_handhake" param (default True) to wrap_socket(). If it's False, handshake won't be performed by wrap_socket(), as it would be done in blocking way normally. Instead, SSL socket can be set to non-blocking mode, and handshake would be performed before the first read/write request (by just returning EAGAIN to these requests, while instead reading/writing/ processing handshake over the connection). Unfortunately, axTLS doesn't really support non-blocking handshake correctly. So, while framework for this is implemented on MicroPython's module side, in case of axTLS, it won't work reliably. 2. Implementation of .setblocking() method. It must be called on SSL socket for blocking vs non-blocking operation to be handled correctly (for example, it's not enough to wrap non-blocking socket with wrap_socket() call - resulting SSL socket won't be itself non-blocking). Note that .setblocking() propagates call to the underlying socket object, as expected.
2019-04-28tests: Skip tests needing machine module if (u)machine doesn't exist.Damien George
2019-03-27tests/extmod: Add test for FAT filesystem on a very large block device.Damien George
2019-02-14extmod/moduwebsocket: Refactor `websocket` to `uwebsocket`.Yonatan Goldschmidt
As mentioned in #4450, `websocket` was experimental with a single intended user, `webrepl`. Therefore, we'll make this change without a weak link `websocket` -> `uwebsocket`.
2018-12-10tests/extmod/uctypes_error: Add test for unsupported unary op.Damien George
2018-12-10tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field.Paul Sokolovsky
2018-10-30tests/extmod: Skip uselect test when CPython doesn't have poll().stijn
CPython does not have an implementation of select.poll() on some operating systems (Windows, OSX depending on version) so skip the test in those cases instead of failing it.
2018-10-23tests/extmod/uctypes_sizeof_layout: Test for sizeof of different layout.Paul Sokolovsky
On almost all realistic platforms, native layout should be larger (or equal) than packed layout.
2018-10-13tests/uctypes_sizeof_od: Test for using OrderedDict as struct descriptorPaul Sokolovsky
Just a copy of uctypes_sizeof.py with minimal changes.
2018-10-05tests/uselect_poll_basic: Add basic test for uselect.poll invariants.Paul Sokolovsky
This test doesn't check the actual I/O behavior, just "static" invariants like behavior on duplicate calls or calls when I/O object is not registered with poller.
2018-09-11tests/extmod/uhashlib_md5: Add coverage tests for MD5 algorithm.Paul Sokolovsky
Based on tests/extmod/uhashlib_sha1.
2018-08-04tests: Make tests work on targets without float support.Ayke van Laethem
2018-07-30tests/extmod/ujson_dump_iobase.py: Return number of bytes written.Damien George
Otherwise returning None indicates that the write would block and nothing was actually written. Fixes issue #3990.
2018-07-20tests: Improve feature detection for VFS.Ayke van Laethem
2018-07-02extmod/modure: Add ure.sub() function and method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_SUB, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-07-02extmod/modure: Add match.span(), start() and end() methods, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_SPAN_START_END, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-07-02extmod/modure: Add match.groups() method, and tests.Damien George
This feature is controlled at compile time by MICROPY_PY_URE_MATCH_GROUPS, disabled by default. Thanks to @dmazzella for the original patch for this feature; see #3770.
2018-06-27tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib.Paul Sokolovsky
Tests for separate input and output buffer (alloc-free operation) and the same writable buffer used as input and output (inplace operation).
2018-06-27tests/extmod/ucryptolib*: Add tests for ucryptolib module.Paul Sokolovsky
2018-06-18tests/extmod: Add test for ujson.dump writing to a user IOBase object.Damien George
2018-06-18tests/extmod/ujson_dump.py: Add test for dump to non-stream object.Damien George
2018-06-12tests/extmod: Add test for VFS and user-defined filesystem and files.Damien George
2018-06-06tests/extmod: Remove conditional import of uos_vfs, it no longer exists.Damien George
This conditional import was only used to get the tests working on the unix coverage build, which has now switched to use VFS by default so the uos module alone has the required functionality.
2018-06-06tests/extmod: Add test for importing a script from a user VFS.Damien George
2018-03-12extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple.Tom Collins
2018-03-04tests/extmod/time_ms_us: Fix ticks tests, ticks_diff args are reversed.Damien George
2018-03-04tests/extmod/time_ms_us: Add test for calling ticks_cpu().Damien George
This is just to test that the function exists and returns some kind of valid value. Although this file is for testing ms/us functions, put the ticks_cpu() test here so not to add a new test file.
2018-02-28tests/extmod/vfs_fat_fileio1: Add test for calling file obj finaliser.Damien George
2018-02-26tests/extmod/uzlib_decompress: Add uzlib tests to improve coverage.Damien George
2018-02-26tests/extmod/vfs_fat_fileio1: Add test for failing alloc with finaliser.Damien George