diff options
author | Stefan Krah <skrah@bytereef.org> | 2014-08-26 18:46:49 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2014-08-26 18:46:49 (GMT) |
commit | 298131a44896a4fec1ea829814ad52409d59aba5 (patch) | |
tree | 95f1a1123071fdbc602fe25e7514ccd09500a028 /Lib/test | |
parent | d84fd73de2823afd8da5c3e5937d51f7ecad8a34 (diff) | |
download | cpython-298131a44896a4fec1ea829814ad52409d59aba5.zip cpython-298131a44896a4fec1ea829814ad52409d59aba5.tar.gz cpython-298131a44896a4fec1ea829814ad52409d59aba5.tar.bz2 |
Issue #22090: Fix '%' formatting for infinities and NaNs.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_decimal.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py index 8358ba6..b4c8c34 100644 --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -1057,6 +1057,11 @@ class FormatTest(unittest.TestCase): # issue 6850 ('a=-7.0', '0.12345', 'aaaa0.1'), + + # issue 22090 + ('<^+15.20%', 'inf', '<<+Infinity%<<<'), + ('\x07>,%', 'sNaN1234567', 'sNaN1234567%'), + ('=10.10%', 'NaN123', ' NaN123%'), ] for fmt, d, result in test_values: self.assertEqual(format(Decimal(d), fmt), result) |