mcskatkat
e0a1480600
py/objstr: Fix `str % {}` edge case.
...
Eliminate `TypeError` when format string contains no named conversions.
This matches CPython behavior.
Signed-off-by: mcskatkat <mc_skatkat@hotmail.com>
2023-09-01 14:31:57 +10:00
Damien George
66dc1397c9
py/obj: Accept user types in mp_obj_get_int_maybe.
...
This is possible now that MP_UNARY_OP_INT_MAYBE exists.
As a consequence mp_obj_get_int now also supports user types, which was
previously possible with MP_UNARY_OP_INT but no tests existed for it.
Signed-off-by: Damien George <damien@micropython.org>
2023-06-01 14:18:54 +10:00
Yonatan Goldschmidt
cb4472df42
tests: Add boolean-as-integer formatting tests for fixed regression.
...
As suggested by @dpgeorge in #5538 .
2020-01-24 10:57:17 +11:00
Damien George
eebffb2b5b
tests/basics: Automatically skip tests that use str/bytes modulo-format.
2019-10-29 22:22:37 +11:00
Damien George
ecb4357fe1
tests/basics: Move string-modulo-format int tests to dedicated file.
2017-03-15 17:34:47 +11:00
Damien George
84fb292cd5
tests/basics/string_format_modulo: Add more tests for dict formatting.
2017-02-03 12:17:43 +11:00
Damien George
b648e98ad0
py/objstr: Fix error reporting for unexpected end of modulo format str.
2015-08-29 23:13:51 +01:00
Damien George
d007cb8903
tests: Add more tests to improve coverage, mostly testing exceptions.
2015-08-21 12:02:09 +01:00
Damien George
26a9975fba
tests: Add some more tests for bytes, bignum, string and ujson.
2015-03-14 21:20:58 +00:00
Damien George
539681fffd
tests: Rename test scripts, changing - to _ for consistency.
...
From now on, all new tests must use underscore.
Addresses issue #727 .
2014-07-05 06:14:29 +01:00