summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_format.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-28856: Let %b format for bytes support objects that follow the buffer ↵Xiang Zhang2017-03-141-2/+6
| | | | | | protocol (GH-546)
* bpo-29568: Disable any characters between two percents for escaped percent ↵Serhiy Storchaka2017-03-081-41/+36
| | | | "%%" in the format string for classic string formatting. (GH-513)
* Issue #29073: Added a test for bytearray formatting with null byte.Serhiy Storchaka2016-12-281-0/+7
|\
| * Issue #29073: bytearray formatting no longer truncates on first null byte.Serhiy Storchaka2016-12-281-0/+7
| |
* | Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-8/+26
|\ \ | |/ | | | | form.
| * Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-8/+26
| | | | | | | | form.
* | Issues #28916, #26483: Merge stdtypes.rst from 3.5Martin Panter2016-12-111-20/+6
|\ \ | |/
| * Issue #28916: Correct description of %o and %x alternative formsMartin Panter2016-12-111-20/+6
| | | | | | | | | | | | | | * In Python 3, the specifier is 0o * There is no special case for leading zeros * Remove duplicate tests * Clarify other existing tests and comments
* | Issue #26983: Fixed test_format failure.Serhiy Storchaka2016-06-061-1/+1
| | | | | | | | Patch by SilentGhost.
* | Issue #25349: Add fast path for b'%c' % intVictor Stinner2015-10-091-0/+2
|/ | | | Optimize also %% formater.
* Issue #23466: Fixed expected error message in test_format.Serhiy Storchaka2015-04-041-1/+1
|
* Issue #23466: Raised OverflowError if %c argument is out of range.Serhiy Storchaka2015-04-031-6/+6
|
* Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError onSerhiy Storchaka2015-03-301-1/+18
| | | | non-integer input.
* Close issue23467: add %r compatibility to bytes and bytearrayEthan Furman2015-03-111-0/+5
|
* Issue20284: Implement PEP461Ethan Furman2015-01-241-141/+244
|
* Issue19995: passing a non-int to %o, %c, %x, or %X now raises an exceptionEthan Furman2014-03-191-10/+0
|
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-4/+13
|\
| * Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-6/+16
| |
* | Catch deprecation warnings emitted when non-integers are formatted with %c, %oSerhiy Storchaka2014-02-061-5/+10
| | | | | | | | and %x (introduced in issue #19995).
* | Issue19995: issue deprecation warning for non-integer values to %c, %o, %x, %XEthan Furman2014-01-121-0/+5
| |
* | Issue19995: %o, %x, %X now only accept intsEthan Furman2014-01-051-5/+0
| |
* | Remove failing checks for explicit error messages.Mark Dickinson2013-10-131-2/+0
| |
* | Issue #18659: fix test_format test that wasn't being executed. Thanks ↵Mark Dickinson2013-10-131-8/+5
| | | | | | | | Vajrasky Kok for the patch.
* | Issue #18659: Backed out changeset cfd875bcbe41 after buildbot failures.Mark Dickinson2013-08-051-3/+7
| |
* | Issue #18659: fix test_format test that wasn't being executed. Thanks ↵Mark Dickinson2013-08-051-7/+3
| | | | | | | | Vajrasky Kok for the patch.
* | (Merge 3.3) Issue #18137: Detect integer overflow on precision inVictor Stinner2013-06-231-0/+17
|\ \ | |/ | | | | float.__format__() and complex.__format__().
| * Issue #18137: Detect integer overflow on precision in float.__format__() andVictor Stinner2013-06-231-0/+17
| | | | | | | | complex.__format__().
* | Add _PyUnicodeWriter_WriteSubstring() functionVictor Stinner2013-04-021-0/+3
| | | | | | | | | | | | | | | | | | Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible
* | #17217: merge with 3.3.Ezio Melotti2013-02-231-3/+3
|\ \ | |/
| * #17217: merge with 3.2.Ezio Melotti2013-02-231-3/+3
| |\
| | * #17217: fix UnicodeEncodeErrors errors in test_format by printing ASCII only.Ezio Melotti2013-02-231-3/+3
| | |
* | | Issue #15609: Optimize str%args for integer argumentVictor Stinner2012-10-011-0/+16
|/ / | | | | | | | | | | | | | | | | | | - Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid a temporary buffer - Enable the fast path when width is smaller or equals to the length, and when the precision is bigger or equals to the length - Add unit tests! - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII() to resize the output string
* | Fix "%f" format of str%args if the result is not an ASCII or latin1 stringVictor Stinner2012-06-161-0/+2
| |
* | Issue #14113: Fix a test_strptime failure caused by changes to LC_ALL.Stefan Krah2012-02-271-1/+2
| |
* | Issue #13706: Fix format(float, "n") for locale with non-ASCII decimal point ↵Victor Stinner2012-02-241-1/+9
| | | | | | | | (e.g. ps_aF)
* | Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separatorVictor Stinner2012-02-231-0/+15
| | | | | | | | | | | | | | | | | | | | | | * Decode thousands separator and decimal point using PyUnicode_DecodeLocale() (from the locale encoding), instead of decoding them implicitly from latin1 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum character if unicode is NULL * Replace MIN/MAX macros by Py_MIN/Py_MAX * stringlib/undef.h undefines STRINGLIB_IS_UNICODE * stringlib/localeutil.h only supports Unicode
* | Issue #13706: Support non-ASCII fill charactersVictor Stinner2012-01-211-0/+20
|/
* Merged revisions 78372-78373 via svnmerge fromMark Dickinson2010-02-231-10/+13
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78372 | mark.dickinson | 2010-02-23 12:53:52 +0000 (Tue, 23 Feb 2010) | 1 line Make global variable overflowok into a keyword argument; this fixes a failure when running ./python -m test.regrtest -R 3:2: test_format ........ r78373 | mark.dickinson | 2010-02-23 13:06:50 +0000 (Tue, 23 Feb 2010) | 1 line Fix spacing nit. Thanks Eric Smith for the public humiliation. ........
* Merged revisions 78082,78086 via svnmerge fromMark Dickinson2010-02-071-10/+6
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78082 | mark.dickinson | 2010-02-07 13:01:56 +0000 (Sun, 07 Feb 2010) | 1 line Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed. ........ r78086 | mark.dickinson | 2010-02-07 13:09:52 +0000 (Sun, 07 Feb 2010) | 1 line Actually raise on failure, instead of doing nothing. ........
* The other half of Issue #1580: use short float repr where possible.Eric Smith2009-04-161-0/+5
| | | | | | | | | | | | | | Addresses the float -> string conversion, using David Gay's code which was added in Mark Dickinson's checkin r71663. Also addresses these, which are intertwined with the short repr changes: - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100' - Issue #5515: 'n' formatting with commas no longer works poorly with leading zeros. - PEP 378 Format Specifier for Thousands Separator: implemented for floats.
* The Unicode database was updated to 5.1, and some characters have become ↵Amaury Forgeot d'Arc2008-09-101-2/+2
| | | | | | printable. Change the tests and use another code point.
* Backed out r65073, pending fixing it in Windows.Eric Smith2008-07-171-11/+0
|
* Merged revisions 65069 via svnmerge fromEric Smith2008-07-171-0/+11
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65069 | eric.smith | 2008-07-17 13:48:39 -0400 (Thu, 17 Jul 2008) | 1 line Issue 3382: Make '%F' and float.__format__('F') convert results to upper case. ........
* Correct a test after r64701.Amaury Forgeot d'Arc2008-07-041-2/+4
|
* #2630: Implement PEP 3138.Georg Brandl2008-06-111-2/+4
| | | | | | | The repr() of a string now contains printable Unicode characters unescaped. The new ascii() builtin can be used to get a repr() with only ASCII characters in it. PEP and patch were written by Atsuo Ishimoto.
* Revert r63934 -- it was mixing two patches.Georg Brandl2008-06-041-4/+2
|
* Remove meaning of -ttt, but still accept -t option on cmdline for compatibility.Georg Brandl2008-06-041-2/+4
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-4/+4
|
* Merged revisions ↵Christian Heimes2008-03-261-202/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 61913,61915-61916,61918-61919,61922-61926,61928-61929,61931,61935,61938,61943 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r61913 | benjamin.peterson | 2008-03-25 22:14:42 +0100 (Tue, 25 Mar 2008) | 2 lines Merged the ACKS from py3k ........ r61915 | thomas.heller | 2008-03-25 22:18:39 +0100 (Tue, 25 Mar 2008) | 1 line Make _ctypes.c PY_SSIZE_T_CLEAN. ........ r61916 | benjamin.peterson | 2008-03-25 22:55:50 +0100 (Tue, 25 Mar 2008) | 3 lines Opps! I merged the revisions, but forgot to add the header to ACKS ........ r61918 | andrew.kuchling | 2008-03-26 01:16:50 +0100 (Wed, 26 Mar 2008) | 1 line Minor docstring typos ........ r61919 | andrew.kuchling | 2008-03-26 01:30:02 +0100 (Wed, 26 Mar 2008) | 1 line Add various items ........ r61922 | neal.norwitz | 2008-03-26 05:55:51 +0100 (Wed, 26 Mar 2008) | 6 lines Try to get this test to be less flaky. It was failing sometimes because the connect would succeed before the timeout occurred. Try using an address and port that hopefully doesn't exist to ensure we get no response. If this doesn't work, we can use a public address close to python.org and hopefully that address never gets taken. ........ r61923 | jerry.seutter | 2008-03-26 06:03:03 +0100 (Wed, 26 Mar 2008) | 1 line Changed test so it no longer runs as a side effect of importing. ........ r61924 | neal.norwitz | 2008-03-26 06:19:41 +0100 (Wed, 26 Mar 2008) | 5 lines Ensure that the mailbox is closed to prevent problems on Windows with removing an open file. This doesn't seem to be a problem in 2.6, but that appears to be somewhat accidental (specific to reference counting). When this gets merged to 3.0, it will make the 3.0 code simpler. ........ r61925 | jerry.seutter | 2008-03-26 06:32:51 +0100 (Wed, 26 Mar 2008) | 1 line Changed test so it no longer runs as a side effect of importing. ........ r61926 | jerry.seutter | 2008-03-26 06:58:14 +0100 (Wed, 26 Mar 2008) | 1 line Changed test so it no longer runs as a side effect of importing. ........ r61928 | georg.brandl | 2008-03-26 10:04:36 +0100 (Wed, 26 Mar 2008) | 2 lines Add Josiah. ........ r61929 | georg.brandl | 2008-03-26 10:32:46 +0100 (Wed, 26 Mar 2008) | 2 lines Add an example for an RFC 822 continuation. ........ r61931 | benjamin.peterson | 2008-03-26 12:57:47 +0100 (Wed, 26 Mar 2008) | 2 lines Added help options to PDB ........ r61935 | christian.heimes | 2008-03-26 13:32:49 +0100 (Wed, 26 Mar 2008) | 1 line Prepare integration of bytearray backport branch ........ r61938 | christian.heimes | 2008-03-26 13:50:43 +0100 (Wed, 26 Mar 2008) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://pythondev@svn.python.org/python/branches/trunk-bytearray ........ r61943 | georg.brandl | 2008-03-26 13:57:47 +0100 (Wed, 26 Mar 2008) | 2 lines Fix and simplify error handling, silencing a compiler warning. ........