summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_decimal.py
Commit message (Collapse)AuthorAgeFilesLines
* Bug #1083645Raymond Hettinger2004-12-181-2/+12
| | | | * The decimal module wouldn't load on builds without threads.
* SF bug #1071588 coercing decimal to int doesn't work between -1 and 1Raymond Hettinger2004-11-241-4/+4
|
* Change the strategy for coping with time intensive tests fromRaymond Hettinger2004-09-041-7/+12
| | | | | | | | "all or none" to "all or some". This provides much greater test coverage without eating much time. It also makes it more likely that routine regression testing will unearth bugs.
* There are no longer any special case test skips.Raymond Hettinger2004-08-171-3/+0
|
* * Dynamically build a list of files to be tested (necessary becauseRaymond Hettinger2004-08-171-81/+14
| | | | | | | version 2.39 of dectest.zip adds some new test files and because some existing test files were getting skipped). * Remove two docstrings which cluttered unittest's output. * Simplify a for-loop with a list comprehension.
* Add a test for Context.copy().Raymond Hettinger2004-08-081-0/+8
|
* * Hide a loop induction variable that was inadvertantly being picked upRaymond Hettinger2004-07-141-28/+0
| | | | | | | by the locals() call in the context constructor. * Remove unnecessary properties for int, exp, and sign which duplicated information returned by as_tuple().
* * Rename "Signals" to "_signals" making it non-public.Raymond Hettinger2004-07-141-1/+7
| | | | | * Context.create_decimal can take a zero default just like Decimal(). * Fix typo in comment.
* Improve Context construction and representation:Raymond Hettinger2004-07-101-16/+12
| | | | | | | | | | | | | * Rename "trap_enablers" to just "traps". * Simplify names of "settraps" and "setflags" to just "traps" and "flags". * Show "capitals" in the context representation * Simplify the Context constructor to match its repr form so that only the set flags and traps need to be listed. * Representation can now be run through eval(). Improve the error message when the Decimal constructor is given a float. The test suite no longer needs a duplicate reset_flags method.
* * Update the test suite to reflect that ConversionSyntax was no longerRaymond Hettinger2004-07-091-2/+2
| | | | | | | | public. * Removed the non-signal conditions from __all__. * Removed the XXX comment which was resolved. * Use ^ instead of operator.xor * Remove the threading lock which is no longer necessary.
* Module and tests:Raymond Hettinger2004-07-091-6/+5
| | | | | | | | | | | | * Map conditions to related signals. * Make contexts unhashable. * Eliminate used "default" attribute in exception definitions. * Eliminate the _filterfunc in favor of a straight list. Docs: * Eliminate documented references to conditions that are not signals. * Eliminate parenthetical notes such as "1/0 --> Inf" which are no longer true with the new defaults.
* * Add __eq__ and __ne__ so that things like list.index() work properlyRaymond Hettinger2004-07-051-11/+16
| | | | | for lists of mixed types. * Test that sort works.
* Test the logic for int(d).Raymond Hettinger2004-07-051-0/+10
|
* * Make the tests independent of the default precision.Raymond Hettinger2004-07-031-0/+7
| | | | * Change the default precision to 28 (to match VB's decimal type).
* Work through several open todos:Raymond Hettinger2004-07-031-7/+23
| | | | | | | | | | | | | | | | | * Added test for pickling contexts * Renamed ExceptionList to Signals (to match wording in the spec) * Simplified Context constructor by allowing flags=None to automatically generate a zeroed-out flags dictionary. * inlined _convertString() which was used only once * _rounding_decision is private, so excluded its contants from __all__. * added an XXX comment with concerns about subclassing signals results in a deviation from the spec (maybe important, maybe not). * Taught the test_suite to determine its own directory (modeled after code in regrtest.py). Enables it to be run when the current directory is not the test directory. * Added a clear_flags() method to the Context API to make it easier to do a common operation with flags. * Fixed the trap_enablers defaults in BasicDefaultContext to match the spec.
* Move Decimal from the sandbox into production.Raymond Hettinger2004-07-011-0/+1082