summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_float.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue 19933: Provide default argument for ndigits in round. Patch by ↵Steve Dower2015-04-151-0/+8
| | | | Vajrasky Kok.
* Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-14/+1
| | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* fix up import styleBenjamin Peterson2015-03-091-5/+8
|
* remove redundant testBenjamin Peterson2015-03-061-5/+0
|
* fix potential refleak in PyFloat_AsDouble (closes #23590)Benjamin Peterson2015-03-061-0/+6
|
* Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-1/+1
|\
| * Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-1/+1
| |
* | #17080: improve error message of float/complex when the wrong type is passed.Ezio Melotti2013-11-071-0/+1
|/
* Remove untests for non-existent functionality.Mark Dickinson2012-04-291-10/+0
|
* Issue #14521: Make result of float('nan') and float('-nan') more consistent ↵Mark Dickinson2012-04-291-0/+13
| | | | across platforms. Further, don't rely on Py_HUGE_VAL for float('inf').
* merge 3.2Benjamin Peterson2011-10-281-0/+6
|\
| * bring is_integer into tested existenceBenjamin Peterson2011-10-281-0/+6
| |
* | #11565: Merge with 3.2.Ezio Melotti2011-03-161-2/+2
|\ \ | |/
| * #11565: Merge with 3.1.Ezio Melotti2011-03-161-2/+2
| |\
| | * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-2/+2
| | |
| | * Merged revisions 87032 via svnmerge fromMark Dickinson2010-12-041-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines Issue #10596: Fix float.__mod__ to have the same behaviour as float.__divmod__ with respect to signed zeros. ........
| | * Backout broken backport. (Sorry.)Mark Dickinson2010-12-041-20/+10
| | |
| | * Merged revisions 87032 via svnmerge fromMark Dickinson2010-12-041-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines Issue #10596: Fix float.__mod__ to have the same behaviour as float.__divmod__ with respect to signed zeros. ........
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| | * Merged revisions 86003 via svnmerge fromBrian Curtin2010-10-311-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86003 | brian.curtin | 2010-10-30 19:03:45 -0500 (Sat, 30 Oct 2010) | 2 lines Fix ResourceWarning. Use context manager to properly close file. ........
| | * Merged revisions 77452 via svnmerge fromMark Dickinson2010-01-121-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77452 | mark.dickinson | 2010-01-12 23:04:19 +0000 (Tue, 12 Jan 2010) | 23 lines Merged revisions 77410,77421,77450-77451 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77410 | mark.dickinson | 2010-01-10 13:06:31 +0000 (Sun, 10 Jan 2010) | 1 line Remove unused BCinfo fields and an unused macro. ........ r77421 | mark.dickinson | 2010-01-11 17:15:13 +0000 (Mon, 11 Jan 2010) | 1 line Change a variable type to avoid signed overflow; replace repeated '19999' constant by a define. ........ r77450 | mark.dickinson | 2010-01-12 22:23:56 +0000 (Tue, 12 Jan 2010) | 4 lines Issue #7632: Fix a problem with _Py_dg_strtod that could lead to crashes in debug builds, for certain long numeric strings corresponding to subnormal values. ........ r77451 | mark.dickinson | 2010-01-12 22:55:51 +0000 (Tue, 12 Jan 2010) | 2 lines Issue #7632: Fix a bug in dtoa.c that could lead to incorrectly-rounded results. ........ ................
| | * Merged revisions 76485 via svnmerge fromMark Dickinson2009-11-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@www.python.org/python/branches/py3k ................ r76485 | mark.dickinson | 2009-11-24 10:59:34 +0000 (Tue, 24 Nov 2009) | 9 lines Merged revisions 76483 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76483 | mark.dickinson | 2009-11-24 10:54:58 +0000 (Tue, 24 Nov 2009) | 2 lines round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this. ........ ................
| | * Merged revisions 75890 via svnmerge fromMark Dickinson2009-10-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r75890 | mark.dickinson | 2009-10-27 23:00:56 +0000 (Tue, 27 Oct 2009) | 1 line Remove extra blank line accidentally introduced in r75885 ........
| | * Merged revisions 75885 via svnmerge fromMark Dickinson2009-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75885 | mark.dickinson | 2009-10-27 22:12:20 +0000 (Tue, 27 Oct 2009) | 9 lines Merged revisions 75883 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75883 | mark.dickinson | 2009-10-27 22:09:33 +0000 (Tue, 27 Oct 2009) | 1 line Test long inputs to float ........ ................
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | | Removed fcmp and FUZZ from test.support, following the discussion on python-dev:Eli Bendersky2011-02-251-1/+1
|/ / | | | | | | http://mail.python.org/pipermail/python-dev/2011-January/107735.html
* | Issue #10624: Use support.requires_IEEE_754 in all appropriate tests.Eric Smith2010-12-041-10/+6
| |
* | Issue #10596: Fix float.__mod__ to have the same behaviour asMark Dickinson2010-12-041-0/+20
| | | | | | | | float.__divmod__ with respect to signed zeros.
* | Issue #10557: Fixed error messages from float() and other numericAlexander Belopolsky2010-12-041-1/+17
| | | | | | | | | | | | types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents.
* | Issue #7094: Add alternate ('#') flag to __format__ methods for float, ↵Eric Smith2010-11-251-5/+2
| | | | | | | | complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon.
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-3/+3
| |
* | Fix ResourceWarning. Use context manager to properly close file.Brian Curtin2010-10-311-11/+12
| |
* | Issue #9337: Make float.__str__ identical to float.__repr__.Mark Dickinson2010-08-041-1/+3
| | | | | | | | (And similarly for complex numbers.)
* | Merged revisions 82461 via svnmerge fromBenjamin Peterson2010-07-021-42/+29
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82461 | benjamin.peterson | 2010-07-02 18:05:27 -0500 (Fri, 02 Jul 2010) | 1 line don't require the presence of __getformat__ or __setformat__; use requires_IEEE_754 globally ........
* | Merged revisions 82117 via svnmerge fromMark Dickinson2010-06-201-102/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82117 | mark.dickinson | 2010-06-20 19:50:19 +0100 (Sun, 20 Jun 2010) | 1 line Merge test_strtod and test_float string-to-float conversion tests. ........
* | Issue #8188: Introduce a new scheme for computing hashes of numbersMark Dickinson2010-05-231-9/+0
| | | | | | | | | | | | (instances of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it easy to maintain the invariant that hash(x) == hash(y) whenever x and y have equal value.
* | Merged revisions 79804 via svnmerge fromMark Dickinson2010-04-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79804 | mark.dickinson | 2010-04-05 19:07:51 +0100 (Mon, 05 Apr 2010) | 5 lines Use a more robust infinity check in _Py_HashDouble. This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently doesn't follow C99 Annex F on FreeBSD.) ........
* | Merged revisions 78093 via svnmerge fromGeorg Brandl2010-03-141-1/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line Remove unused imports in test modules. ........
* | Merged revisions 78166 via svnmerge fromMark Dickinson2010-02-121-0/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78166 | mark.dickinson | 2010-02-12 21:16:38 +0000 (Fri, 12 Feb 2010) | 1 line Check that 'd' isn't allowed as an exponent specifier in inputs to the float function. ........
* | use assert[Not]In where appropriateEzio Melotti2010-01-231-9/+4
| |
* | use assert[Not]In where appropriateBenjamin Peterson2010-01-191-0/+5
| | | | | | | | A patch from Dave Malcolm.
* | Merged revisions 77410,77421,77450-77451 via svnmerge fromMark Dickinson2010-01-121-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77410 | mark.dickinson | 2010-01-10 13:06:31 +0000 (Sun, 10 Jan 2010) | 1 line Remove unused BCinfo fields and an unused macro. ........ r77421 | mark.dickinson | 2010-01-11 17:15:13 +0000 (Mon, 11 Jan 2010) | 1 line Change a variable type to avoid signed overflow; replace repeated '19999' constant by a define. ........ r77450 | mark.dickinson | 2010-01-12 22:23:56 +0000 (Tue, 12 Jan 2010) | 4 lines Issue #7632: Fix a problem with _Py_dg_strtod that could lead to crashes in debug builds, for certain long numeric strings corresponding to subnormal values. ........ r77451 | mark.dickinson | 2010-01-12 22:55:51 +0000 (Tue, 12 Jan 2010) | 2 lines Issue #7632: Fix a bug in dtoa.c that could lead to incorrectly-rounded results. ........
* | Merged revisions 77139-77140 via svnmerge fromMark Dickinson2009-12-301-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77139 | mark.dickinson | 2009-12-30 12:12:23 +0000 (Wed, 30 Dec 2009) | 3 lines Issue #7534: Fix handling of nans, infinities, and negative zero in ** operator, on IEEE 754 platforms. Thanks Marcos Donolo for original patch. ........ r77140 | mark.dickinson | 2009-12-30 12:22:49 +0000 (Wed, 30 Dec 2009) | 1 line Add Marcos Donolo for work on issue 7534 patch. ........
* | Merged revisions 76632 via svnmerge fromEric Smith2009-12-021-0/+35
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76632 | eric.smith | 2009-12-02 12:43:06 -0500 (Wed, 02 Dec 2009) | 1 line Issue #4482: Add tests for special float value formatting. ........
* | Merged revisions 76483 via svnmerge fromMark Dickinson2009-11-241-0/+4
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76483 | mark.dickinson | 2009-11-24 10:54:58 +0000 (Tue, 24 Nov 2009) | 2 lines round(0, "ermintrude") succeeded instead of producing a TypeError. Fix this. ........
* | Remove extra blank line accidentally introduced in r75885Mark Dickinson2009-10-271-1/+0
| |
* | Merged revisions 75883 via svnmerge fromMark Dickinson2009-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75883 | mark.dickinson | 2009-10-27 22:09:33 +0000 (Tue, 27 Oct 2009) | 1 line Test long inputs to float ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-30/+30
|/
* Refactor to remove duplicated nan/inf parsing code inMark Dickinson2009-05-201-0/+10
| | | | pystrtod.c, floatobject.c and dtoa.c.
* Merged revisions 72564 via svnmerge fromMark Dickinson2009-05-111-0/+31
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72564 | mark.dickinson | 2009-05-11 16:33:08 +0100 (Mon, 11 May 2009) | 2 lines Issue #5981: Fix some float.fromhex bugs related to inf and nan handling. ........