mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Issue #6850: Fix bug in Decimal._parse_format_specifier for formats
with no type specifier.
This commit is contained in:
parent
d692a71fdd
commit
491ea55f28
3 changed files with 7 additions and 1 deletions
|
@ -760,6 +760,9 @@ class DecimalFormatTest(unittest.TestCase):
|
|||
(',%', '123.456789', '12,345.6789%'),
|
||||
(',e', '123456', '1.23456e+5'),
|
||||
(',E', '123456', '1.23456E+5'),
|
||||
|
||||
# issue 6850
|
||||
('a=-7.0', '0.12345', 'aaaa0.1'),
|
||||
]
|
||||
for fmt, d, result in test_values:
|
||||
self.assertEqual(format(Decimal(d), fmt), result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue