micropython/tests/extmod
Eric Poulsen 01054f2092 py/objdict: Quote non-string types when used as keys in JSON output.
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-07-30 16:34:27 +10:00
..
btree1.py
btree1.py.exp
framebuf1.py
framebuf1.py.exp
framebuf2.py
framebuf2.py.exp
framebuf4.py
framebuf4.py.exp
framebuf8.py extmod/modframebuf: Add 8-bit greyscale format (GS8). 2017-12-14 17:36:13 +11:00
framebuf8.py.exp extmod/modframebuf: Add 8-bit greyscale format (GS8). 2017-12-14 17:36:13 +11:00
framebuf16.py
framebuf16.py.exp
framebuf_subclass.py
framebuf_subclass.py.exp
machine1.py
machine1.py.exp
machine_pinbase.py tests: Skip tests needing machine module if (u)machine doesn't exist. 2019-04-28 22:12:17 +10:00
machine_pinbase.py.exp
machine_pulse.py tests: Skip tests needing machine module if (u)machine doesn't exist. 2019-04-28 22:12:17 +10:00
machine_pulse.py.exp
machine_signal.py tests: Skip tests needing machine module if (u)machine doesn't exist. 2019-04-28 22:12:17 +10:00
machine_signal.py.exp
ticks_diff.py
ticks_diff.py.exp
time_ms_us.py tests/extmod/time_ms_us: Fix ticks tests, ticks_diff args are reversed. 2018-03-04 00:38:15 +11:00
time_ms_us.py.exp tests/extmod/time_ms_us: Add test for calling ticks_cpu(). 2018-03-04 00:17:33 +11:00
ubinascii_a2b_base64.py
ubinascii_b2a_base64.py
ubinascii_crc32.py
ubinascii_hexlify.py
ubinascii_micropython.py
ubinascii_micropython.py.exp
ubinascii_unhexlify.py
ucryptolib_aes128_cbc.py tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_cbc.py.exp tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_ctr.py extmod/moducryptolib: Add AES-CTR support. 2019-05-06 18:09:48 +10:00
ucryptolib_aes128_ctr.py.exp extmod/moducryptolib: Add AES-CTR support. 2019-05-06 18:09:48 +10:00
ucryptolib_aes128_ecb.py tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_ecb.py.exp tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_ecb_enc.py tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_ecb_enc.py.exp tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes128_ecb_inpl.py tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib. 2018-06-27 14:56:46 +10:00
ucryptolib_aes128_ecb_inpl.py.exp tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib. 2018-06-27 14:56:46 +10:00
ucryptolib_aes128_ecb_into.py tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib. 2018-06-27 14:56:46 +10:00
ucryptolib_aes128_ecb_into.py.exp tests/extmod/ucryptolib*: Add into and inplace tests for ucryptolib. 2018-06-27 14:56:46 +10:00
ucryptolib_aes256_cbc.py tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes256_cbc.py.exp tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes256_ecb.py tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
ucryptolib_aes256_ecb.py.exp tests/extmod/ucryptolib*: Add tests for ucryptolib module. 2018-06-27 14:56:31 +10:00
uctypes_32bit_intbig.py
uctypes_32bit_intbig.py.exp
uctypes_array_assign_le.py
uctypes_array_assign_le.py.exp
uctypes_array_assign_native_le.py
uctypes_array_assign_native_le.py.exp
uctypes_array_assign_native_le_intbig.py
uctypes_array_assign_native_le_intbig.py.exp
uctypes_bytearray.py tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_bytearray.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_byteat.py tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_byteat.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_error.py tests/extmod/uctypes_error: Add test for unsupported unary op. 2018-12-10 14:29:41 +11:00
uctypes_error.py.exp tests/extmod/uctypes_error: Add test for unsupported unary op. 2018-12-10 14:29:41 +11:00
uctypes_le.py
uctypes_le.py.exp
uctypes_le_float.py
uctypes_le_float.py.exp
uctypes_native_float.py
uctypes_native_float.py.exp
uctypes_native_le.py
uctypes_native_le.py.exp
uctypes_print.py
uctypes_print.py.exp
uctypes_ptr_le.py tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field. 2018-12-10 14:25:06 +11:00
uctypes_ptr_le.py.exp tests/extmod/uctypes_ptr_le: Test int() operation on a pointer field. 2018-12-10 14:25:06 +11:00
uctypes_ptr_native_le.py
uctypes_ptr_native_le.py.exp
uctypes_sizeof.py tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof_float.py tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof_float.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof_layout.py tests/extmod/uctypes_sizeof_layout: Test for sizeof of different layout. 2018-10-23 11:33:35 +11:00
uctypes_sizeof_layout.py.exp tests/extmod/uctypes_sizeof_layout: Test for sizeof of different layout. 2018-10-23 11:33:35 +11:00
uctypes_sizeof_native.py
uctypes_sizeof_native.py.exp
uctypes_sizeof_od.py tests/uctypes_sizeof_od: Test for using OrderedDict as struct descriptor 2018-10-13 16:08:25 +11:00
uctypes_sizeof_od.py.exp tests/uctypes_sizeof_od: Test for using OrderedDict as struct descriptor 2018-10-13 16:08:25 +11:00
uhashlib_md5.py tests/extmod/uhashlib_md5: Add coverage tests for MD5 algorithm. 2018-09-11 14:52:00 +10:00
uhashlib_sha1.py
uhashlib_sha256.py tests/extmod/uhashlib_sha256: Add test for hashing 56 bytes of data. 2017-12-19 14:46:31 +11:00
uheapq1.py
ujson_dump.py tests/extmod/ujson_dump.py: Add test for dump to non-stream object. 2018-06-18 12:35:56 +10:00
ujson_dump_iobase.py tests/extmod/ujson_dump_iobase.py: Return number of bytes written. 2018-07-30 12:05:48 +10:00
ujson_dumps.py py/objdict: Quote non-string types when used as keys in JSON output. 2019-07-30 16:34:27 +10:00
ujson_dumps_extra.py
ujson_dumps_extra.py.exp
ujson_dumps_float.py py/objdict: Quote non-string types when used as keys in JSON output. 2019-07-30 16:34:27 +10:00
ujson_load.py
ujson_loads.py
ujson_loads_float.py extmod/modujson: Handle parsing of floats with + in the exponent. 2019-05-14 14:45:54 +10:00
urandom_basic.py
urandom_extra.py tests: Make tests work on targets without float support. 2018-08-04 15:14:23 +10:00
urandom_extra_float.py tests: Make tests work on targets without float support. 2018-08-04 15:14:23 +10:00
ure1.py
ure_debug.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ure_debug.py.exp
ure_error.py
ure_group.py
ure_groups.py extmod/modure: Add match.groups() method, and tests. 2018-07-02 14:53:30 +10:00
ure_namedclass.py
ure_span.py extmod/modure: Add match.span(), start() and end() methods, and tests. 2018-07-02 14:54:56 +10:00
ure_split.py
ure_split_empty.py
ure_split_empty.py.exp
ure_split_notimpl.py
ure_split_notimpl.py.exp
ure_stack_overflow.py
ure_stack_overflow.py.exp
ure_sub.py extmod/modure: Add ure.sub() function and method, and tests. 2018-07-02 14:55:02 +10:00
ure_sub_unmatched.py extmod/modure: Add ure.sub() function and method, and tests. 2018-07-02 14:55:02 +10:00
ure_sub_unmatched.py.exp extmod/modure: Add ure.sub() function and method, and tests. 2018-07-02 14:55:02 +10:00
uselect_poll_basic.py tests/extmod: Skip uselect test when CPython doesn't have poll(). 2018-10-30 14:49:23 +11:00
ussl_basic.py tests/ussl_basic: Disable setblocking() calls. 2019-04-30 17:27:28 +10:00
ussl_basic.py.exp tests/ussl_basic: Disable setblocking() calls. 2019-04-30 17:27:28 +10:00
utimeq1.py
utimeq1.py.exp
utimeq_stable.py
utimeq_stable.py.exp
uzlib_decompio.py
uzlib_decompio.py.exp
uzlib_decompio_gz.py
uzlib_decompio_gz.py.exp
uzlib_decompress.py tests/extmod/uzlib_decompress: Add uzlib tests to improve coverage. 2018-02-26 13:36:55 +11:00
vfs_basic.py tests/extmod: Remove conditional import of uos_vfs, it no longer exists. 2018-06-06 14:28:23 +10:00
vfs_basic.py.exp
vfs_fat_fileio1.py tests/extmod: Remove conditional import of uos_vfs, it no longer exists. 2018-06-06 14:28:23 +10:00
vfs_fat_fileio1.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_fileio2.py tests/extmod: Remove conditional import of uos_vfs, it no longer exists. 2018-06-06 14:28:23 +10:00
vfs_fat_fileio2.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_more.py tests: Improve feature detection for VFS. 2018-07-20 00:50:57 +02:00
vfs_fat_more.py.exp tests/extmod: Add test for importing a script from a user VFS. 2018-06-06 14:28:23 +10:00
vfs_fat_oldproto.py tests/extmod: Remove conditional import of uos_vfs, it no longer exists. 2018-06-06 14:28:23 +10:00
vfs_fat_oldproto.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_ramdisk.py tests/extmod: Remove conditional import of uos_vfs, it no longer exists. 2018-06-06 14:28:23 +10:00
vfs_fat_ramdisk.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_ramdisklarge.py tests/extmod: Add test for FAT filesystem on a very large block device. 2019-03-27 10:22:38 +11:00
vfs_fat_ramdisklarge.py.exp tests/extmod: Add test for FAT filesystem on a very large block device. 2019-03-27 10:22:38 +11:00
vfs_userfs.py tests: Improve feature detection for VFS. 2018-07-20 00:50:57 +02:00
vfs_userfs.py.exp tests/extmod: Add test for VFS and user-defined filesystem and files. 2018-06-12 12:29:26 +10:00
websocket_basic.py extmod/moduwebsocket: Refactor `websocket` to `uwebsocket`. 2019-02-14 00:35:45 +11:00
websocket_basic.py.exp