mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
Issue #10650: Remove the non-standard 'watchexp' parameter from the
Decimal.quantize() method in the Python version. It had never been present in the C version.
This commit is contained in:
parent
5c2ac8c1c6
commit
b151f8f60b
4 changed files with 8 additions and 32 deletions
|
@ -4448,18 +4448,6 @@ class PyCoverage(Coverage):
|
|||
class PyFunctionality(unittest.TestCase):
|
||||
"""Extra functionality in decimal.py"""
|
||||
|
||||
def test_py_quantize_watchexp(self):
|
||||
# watchexp functionality
|
||||
Decimal = P.Decimal
|
||||
localcontext = P.localcontext
|
||||
|
||||
with localcontext() as c:
|
||||
c.prec = 1
|
||||
c.Emax = 1
|
||||
c.Emin = -1
|
||||
x = Decimal(99999).quantize(Decimal("1e3"), watchexp=False)
|
||||
self.assertEqual(x, Decimal('1.00E+5'))
|
||||
|
||||
def test_py_alternate_formatting(self):
|
||||
# triples giving a format, a Decimal, and the expected result
|
||||
Decimal = P.Decimal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue