summaryrefslogtreecommitdiff
path: root/tests/basics/string_format.py
AgeCommit message (Collapse)Author
2025-05-13py/objstr: Add support for the :_b/o/x specifier in str.format.Jeff Epler
This groups non-decimal values by fours, such as bbb_bbbb_bbbb. It also supports `{:_d}` to use underscore for decimal numbers (grouped in threes). Use of incorrect ":,b" is not diagnosed. Thanks to @dpgeorge for the suggestion to reduce code size. Signed-off-by: Jeff Epler <jepler@gmail.com>
2020-01-24tests: Add boolean-as-integer formatting tests for fixed regression.Yonatan Goldschmidt
As suggested by @dpgeorge in #5538.
2016-03-15tests: Split large tests into smaller files, to run with a small heap.Damien George
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.
2016-02-02py/objstr: For str.format, add nested/computed fields support.pohmelie
Eg: '{:{}}'.format(123, '>20') @pohmelie was the original author of this patch, but @dpgeorge made significant changes to reduce code size and improve efficiency.
2016-01-04py/objstr: In str.format, handle case of no format spec for string arg.Damien George
Handles, eg, "{:>20}".format("foo"), where there is no explicit spec for the type of the argument.
2015-09-03tests: Add tests to improve coverage of objstr.c.Damien George
2015-08-30py/objstr: Simplify error handling for bad conversion specifier.Damien George
2015-08-29py/objstr: Fix error type for badly formatted format specifier.Damien George
Was KeyError, should be ValueError.
2015-08-21tests: Add more tests to improve coverage, mostly testing exceptions.Damien George
2015-03-14tests: Add some more tests for bytes, bignum, string and ujson.Damien George
2015-01-04objstr: Implement kwargs support for str.format().Paul Sokolovsky
2014-07-05tests: Rename test scripts, changing - to _ for consistency.Damien George
From now on, all new tests must use underscore. Addresses issue #727.