History log of /external/python/cpython2/Lib/test/test_format.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c30f27d1f2fd3458683ccb1167b9ffa6ad248e93 01-Dec-2016 Serhiy Storchaka <storchaka@gmail.com> Issue #11145: Fixed miscellaneous issues with C-style formatting of types
with custom __oct__ and __hex__.
/external/python/cpython2/Lib/test/test_format.py
149d080871f9bef276a3d4fa251ba6fbc910f770 10-Apr-2016 Serhiy Storchaka <storchaka@gmail.com> Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properly
ignore errors from a __int__() method.

Patch based on the patch for issue #15516.
/external/python/cpython2/Lib/test/test_format.py
76249ea4a7ab1cb0fa41d967b2fb8975916cb955 07-Feb-2014 Serhiy Storchaka <storchaka@gmail.com> Issue #20532: Tests which use _testcapi now are marked as CPython only.
/external/python/cpython2/Lib/test/test_format.py
760388100e2cc21c5d58a9014db5426e6107b5e4 23-Jun-2013 Victor Stinner <victor.stinner@gmail.com> Issue #18137: Detect integer overflow on precision in float.__format__()
and complex.__format__().
/external/python/cpython2/Lib/test/test_format.py
a708adfcf663e871dd3acdbea358f9bc047ec64b 02-Jan-2013 Benjamin Peterson <benjamin@python.org> call PyErr_Clear() when ignoring error from PyNumber_Int (closes #15516)

Patch from Tom Tromey.
/external/python/cpython2/Lib/test/test_format.py
cf80f04b16e25d05f60ca9a2e94cbf742b01d47a 23-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Fix spacing nit. Thanks Eric Smith for the public humiliation.
/external/python/cpython2/Lib/test/test_format.py
8ee9187a163b5c2735072096baf61affaa935063 23-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Make global variable overflowok into a keyword argument; this fixes a failure when running ./python -m test.regrtest -R 3:2: test_format
/external/python/cpython2/Lib/test/test_format.py
1224f4afb43afa3b4e529c99139f067f528a3951 07-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Actually raise on failure, instead of doing nothing.
/external/python/cpython2/Lib/test/test_format.py
4dcba975900d21a84c14bf0cbc7c167839fcef9d 07-Feb-2010 Mark Dickinson <dickinsm@gmail.com> Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed.
/external/python/cpython2/Lib/test/test_format.py
aca19e6a740c424aec243a4721b18d12e9129aa7 22-Apr-2009 Eric Smith <eric@trueblade.com> Backport of some of the work in r71665 to trunk. This reworks much of
int, long, and float __format__(), and it keeps their implementation
in sync with py3k.

Also added PyOS_double_to_string. This is the "fallback" version
that's also available in trunk, and should be kept in sync with that
code. I'll add an issue to document PyOS_double_to_string in the C
API.

There are many internal cleanups. Externally visible changes include:

- Implement PEP 378, Format Specifier for Thousands Separator, for
floats, ints, and longs.

- Issue #5515: 'n' formatting for ints, longs, and floats handles
leading zero formatting poorly.

- Issue #5772: For float.__format__, don't add a trailing ".0" if
we're using no type code and we have an exponent.
/external/python/cpython2/Lib/test/test_format.py
d6c393ab2bf239d9f25ceab6f9b3b83e44848343 17-Jul-2008 Eric Smith <eric@trueblade.com> Backed out r65069, pending fixing it in Windows.
/external/python/cpython2/Lib/test/test_format.py
454816d8bdd6ec9bb986aa31760518e622dc1ea7 17-Jul-2008 Eric Smith <eric@trueblade.com> Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.
/external/python/cpython2/Lib/test/test_format.py
9f7af8d4da15e41b289c271664d28dea4114ded0 26-Mar-2008 Jerry Seutter <jseutter@gmail.com> Changed test so it no longer runs as a side effect of importing.
/external/python/cpython2/Lib/test/test_format.py
c11cecf3d0f816893f5765a7b5e25d5f4e3fe531 24-Feb-2008 Facundo Batista <facundobatista@gmail.com> Issue 1742669. Now %d accepts very big float numbers.
Thanks Gabriel Genellina.
/external/python/cpython2/Lib/test/test_format.py
7c3b50db6614c677588096191d432e734257a244 12-Jul-2007 Georg Brandl <georg@python.org> Patch #1673759: add a missing overflow check when formatting floats
with %G.
/external/python/cpython2/Lib/test/test_format.py
170eee9d6ae4ad4270cfd164c046c2381d746191 03-May-2007 Kristján Valur Jónsson <kristjan@ccpgames.com> Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64. Now the testsuite is well behaved on that platform.
/external/python/cpython2/Lib/test/test_format.py
283a1353a0834d53b230b22e8db9e7b4fcd220d0 19-Nov-2006 Georg Brandl <georg@python.org> Patch [ 1586791 ] better error msgs for some TypeErrors
/external/python/cpython2/Lib/test/test_format.py
56423e5762fc7eef66da0f04baa59c185c79ca81 13-Aug-2006 Neal Norwitz <nnorwitz@gmail.com> Fix segfault when doing string formatting on subclasses of long if
__oct__, __hex__ don't return a string.

Klocwork 308
/external/python/cpython2/Lib/test/test_format.py
457bf91a7fb1ab628a94fe740450f137b4ee1b92 30-Nov-2003 Guido van Rossum <guido@python.org> Fix a bug discovered by Kalle Svensson: comparing sys.maxint to
2**32-1 makes no sense. Use 2**31-1 instead.
/external/python/cpython2/Lib/test/test_format.py
6c9e130524533263b690e86639a36b6f3e7a8eeb 30-Nov-2003 Guido van Rossum <guido@python.org> - Removed FutureWarnings related to hex/oct literals and conversions
and left shifts. (Thanks to Kalle Svensson for SF patch 849227.)
This addresses most of the remaining semantic changes promised by
PEP 237, except for repr() of a long, which still shows the trailing
'L'. The PEP appears to promise warnings for operations that
changed semantics compared to Python 2.3, but this is not
implemented; we've suffered through enough warnings related to
hex/oct literals and I think it's best to be silent now.
/external/python/cpython2/Lib/test/test_format.py
77c06fbf942bf4c532d0f8d6f254882a9e5957ec 24-Nov-2002 Tim Peters <tim.peters@gmail.com> Whitespace normalization.
/external/python/cpython2/Lib/test/test_format.py
80a1bf4b5db4880f01d30b89ab5f6c436d50c8e6 13-Nov-2002 Neal Norwitz <nnorwitz@gmail.com> Fix SF # 635969, No error "not all arguments converted"

When mwh added extended slicing, strings and unicode became mappings.
Thus, dict was set which prevented an error when doing:
newstr = 'format without a percent' % string_value

This fix raises an exception again when there are no formats
and % with a string value.
/external/python/cpython2/Lib/test/test_format.py
549ab8a98d0d5981558660b414b9c0849d644795 11-Oct-2002 Michael W. Hudson <mwh@python.net> A test for the recent overflow-in-format-crash bug.

Only runs when sys.maxint == 2**32 - 1; different things go wrong
on a 64-bit box.
/external/python/cpython2/Lib/test/test_format.py
469cdad8228df7bc294dc946b8cd4c0b7f810735 08-Aug-2002 Tim Peters <tim.peters@gmail.com> Whitespace normalization.
/external/python/cpython2/Lib/test/test_format.py
88fe4ff5a962dfd2e1889c5d5c1a04c00b8264ba 28-Jul-2002 Neal Norwitz <nnorwitz@gmail.com> Fix the problem of not raising a TypeError exception when doing:
'%g' % '1'
'%d' % '1'

Add a test for these conditions
Fix the test so that if not exception is raise, this is a failure
/external/python/cpython2/Lib/test/test_format.py
04f357cffef6d764f2f0ff2671dabde75ec250d1 23-Jul-2002 Barry Warsaw <barry@python.org> Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
/external/python/cpython2/Lib/test/test_format.py
10d72552495a1967af7174f6ed52eb3340799c76 18-Aug-2001 Martin v. Löwis <martin@v.loewis.de> Use raw-unicode-escape for the tests that require it.
/external/python/cpython2/Lib/test/test_format.py
339d0f720e86dc34837547c90d3003a4a68d7d46 17-Aug-2001 Martin v. Löwis <martin@v.loewis.de> Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
/external/python/cpython2/Lib/test/test_format.py
fff53250789c3879e5f63d4dde80d17e0b9c4dbb 12-Apr-2001 Tim Peters <tim.peters@gmail.com> Bug 415514 reported that e.g.
"%#x" % 0
blew up, at heart because C sprintf supplies a base marker if and only if
the value is not 0. I then fixed that, by tolerating C's inconsistency
when it does %#x, and taking away that *Python* produced 0x0 when
formatting 0L (the "long" flavor of 0) under %#x itself. But after talking
with Guido, we agreed it would be better to supply 0x for the short int
case too, despite that it's inconsistent with C, because C is inconsistent
with itself and with Python's hex(0) (plus, while "%#x" % 0 didn't work
before, "%#x" % 0L *did*, and returned "0x0"). Similarly for %#X conversion.
/external/python/cpython2/Lib/test/test_format.py
711088d9b8c6898aad571fb251cb40a8b7d42f64 12-Apr-2001 Tim Peters <tim.peters@gmail.com> Fix for SF bug #415514: "%#x" % 0 caused assertion failure/abort.
http://sourceforge.net/tracker/index.php?func=detail&aid=415514&group_id=5470&atid=105470
For short ints, Python defers to the platform C library to figure out what
%#x should do. The code asserted that the platform C returned a string
beginning with "0x". However, that's not true when-- and only when --the
*value* being formatted is 0. Changed the code to live with C's inconsistency
here. In the meantime, the problem does not arise if you format a long 0 (0L)
instead. However, that's because the code *we* wrote to do %#x conversions on
longs produces a leading "0x" regardless of value. That's probably wrong too:
we should drop leading "0x", for consistency with C, when (& only when) formatting
0L. So I changed the long formatting code to do that too.
/external/python/cpython2/Lib/test/test_format.py
d8c628bd59f70b5389c39fd9e6a15cb3e2d46f27 09-Feb-2001 Eric S. Raymond <esr@thyrsus.com> String method conversion.
(This one was trivial -- no actual string. references in it!)
/external/python/cpython2/Lib/test/test_format.py
d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791 18-Jan-2001 Tim Peters <tim.peters@gmail.com> Whitespace normalization. Leaving tokenize_tests.py alone for now.
/external/python/cpython2/Lib/test/test_format.py
f785042433f0c43ed1ba2ba0388fc51d79bcf5c3 17-Jan-2001 Fredrik Lundh <fredrik@pythonware.com> a bold attempt to fix things broken by MAL's verify patch: import
'verify' iff it's used by a test module...
/external/python/cpython2/Lib/test/test_format.py
3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e 17-Jan-2001 Marc-André Lemburg <mal@egenix.com> This patch removes all uses of "assert" in the regression test suite
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
/external/python/cpython2/Lib/test/test_format.py
c867f74a102a8df376ff55ca4dd9dc9055d16141 20-Dec-2000 Andrew M. Kuchling <amk@amk.ca> Change expected message for ValueError, fixing bug #126400
/external/python/cpython2/Lib/test/test_format.py
4d192b37ecaee5948d92eee0519de391c0b7b446 15-Dec-2000 Andrew M. Kuchling <amk@amk.ca> Add test case for error message raised by bad % format character
(Oh, look, it adds another little utility function for testing)
/external/python/cpython2/Lib/test/test_format.py
a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc 30-Nov-2000 Tim Peters <tim.peters@gmail.com> Fox for SF bug #123859: %[duxXo] long formats inconsistent.
/external/python/cpython2/Lib/test/test_format.py
38fd5b641366eedc74e4be3a0e4d2210f3bcdb5a 21-Sep-2000 Tim Peters <tim.peters@gmail.com> Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats.
Note a curious extension to the std C rules: x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them. But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form). So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long. This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified: the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
/external/python/cpython2/Lib/test/test_format.py
d70141a2d9844ffaf7fbee9ca741ba62a51673ee 30-Jun-2000 Marc-André Lemburg <mal@egenix.com> Marc-Andre Lemburg <mal@lemburg.com>:
New test for huge formatting strings (these could cause core
dumps in previous versions).

By Trent Mick.
/external/python/cpython2/Lib/test/test_format.py