Commit Graph

86 Commits

Author SHA1 Message Date
Ned Deily
3e5e74ad4c Issue #24497: update link in test_decimal comments 2015-06-24 13:36:53 -07:00
Serhiy Storchaka
ad9a1ba504 Issue #23474: Enhanced locale testing. 2015-02-18 08:04:26 +02:00
Serhiy Storchaka
655720e275 Issue #22777: Test pickling with all protocols. 2014-12-15 14:02:43 +02:00
Serhiy Storchaka
20c049df37 Issue #21855: Fixed the decimal module in unicode disabled build. 2014-10-14 21:10:56 +03:00
Stefan Krah
ce2ec49d92 Issue 22090: Fix '%' formatting for infinities and NaNs. 2014-08-26 20:49:57 +02:00
Zachary Ware
9ce635f7bd Issue #18492: Allow all resources when tests are not run by regrtest.py.
This changeset also includes cleanup allowed by this behavior change.
2014-06-02 16:01:16 -05:00
Zachary Ware
1f70221b86 Issue #19572: More silently skipped tests explicitly skipped. 2013-12-10 14:09:20 -06:00
Mark Dickinson
c63be46b23 Remove overeager test (don't depend on the sign of a nan; cf. issue #14521) 2012-08-24 20:26:23 +01:00
Mark Dickinson
088cec3ab7 Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs. 2012-08-24 20:06:30 +01:00
Ezio Melotti
c2077b0d9b #11565: Fix several typos. Patch by Piotr Kasprzyk. 2011-03-16 12:34:31 +02:00
Antoine Pitrou
99d848bd4b Merged revisions 85503 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85503 | antoine.pitrou | 2010-10-15 00:11:44 +0200 (ven., 15 oct. 2010) | 2 lines

  More proper closing of files
........
2010-10-14 22:22:30 +00:00
Mark Dickinson
e85aa739ab Merged revisions 82646,82649-82650 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82646 | mark.dickinson | 2010-07-08 18:23:40 +0100 (Thu, 08 Jul 2010) | 1 line

  In test_decimal, convert heuristic for skipping tests into an explicit skiplist.
........
  r82649 | mark.dickinson | 2010-07-08 20:03:34 +0100 (Thu, 08 Jul 2010) | 1 line

  Fix a performance issue in Decimal.pow.  Thanks Stefan Krah for finding this.
........
  r82650 | mark.dickinson | 2010-07-08 20:09:16 +0100 (Thu, 08 Jul 2010) | 1 line

  Fix misplaced exactness check that was causing unnecessary work in Decimal.__pow__.
........
2010-07-08 19:24:40 +00:00
Mark Dickinson
4f96f5ffc6 Issue #8567: Fix incorrect precedence of signals in Decimal module.
When a Decimal operation raises multiple signals and more than one of
those signals is trapped, the specification determines the order in
which the signals should be handled.  In many cases this order wasn't
being followed, leading to the wrong Python exception being raised.
This commit fixes those cases, and adds extra tests.  The tests are
only enabled when EXTENDEDERRORTESTS is True, since they involve
rerunning each Decimal testcase several times.
2010-05-04 14:25:50 +00:00
Mark Dickinson
16cd2bea1d Fix incorrect use of a list as the target of an 'except' clause in test_decimal.py. 2010-05-01 11:46:20 +00:00
Ezio Melotti
856a3be76a Use more specific assert* methods in test_decimal. 2010-04-03 14:51:00 +00:00
Raymond Hettinger
ed171abd93 Issue 8257: Decimal constructor to accept float. 2010-04-02 18:39:24 +00:00
Mark Dickinson
f3eeca16cb Issue #7279: Make Decimal('nan') hashable. Decimal('snan') remains unhashable.
Also rewrite the Decimal __hash__ method so that it doesn't rely on
float('inf') being valid: float('inf') could raise an exception on
platforms not using IEEE 754 arithmetic.
2010-04-02 10:35:12 +00:00
Mark Dickinson
e096e82e82 Issue #7279: Make comparisons involving a Decimal sNaN signal InvalidOperation. 2010-04-02 10:17:07 +00:00
Mark Dickinson
99d8096c17 Issue #2531: Make float-to-decimal comparisons return correct results.
Float to decimal comparison operations now return a result based on
the numeric values of the operands.  Decimal.__hash__ has also been
fixed so that Decimal and float values that compare equal have equal
hash value.
2010-04-02 08:53:22 +00:00
Antoine Pitrou
6032c25063 Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi. 2010-03-30 18:49:45 +00:00
Florent Xicluna
8f43cec41b Fix py3k warnings in test_decimal, using unittest.assertItemsEqual. 2010-03-21 10:51:40 +00:00
Mark Dickinson
6d8effb1fc Issue #7633: Context method in the decimal module (with the exception
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted.  Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Georg Brandl
a4f46e1292 Remove unused imports in test modules. 2010-02-07 17:03:15 +00:00
Ezio Melotti
b0f5adc3f4 use assert[Not]IsInstance where appropriate 2010-01-24 16:58:36 +00:00
Ezio Melotti
aa98058cc4 use assert[Not]In where appropriate 2010-01-23 23:04:36 +00:00