diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-13 19:23:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 19:23:48 (GMT) |
commit | 9b6c60cbce4ac45e8ccd7934babff465e9769509 (patch) | |
tree | 973d37d42dfe1ce66303ad0cf658bb20870aa88e /Lib/test/test_float.py | |
parent | ce12629c84400c52734859e43b2386deb2b6da12 (diff) | |
download | cpython-9b6c60cbce4ac45e8ccd7934babff465e9769509.zip cpython-9b6c60cbce4ac45e8ccd7934babff465e9769509.tar.gz cpython-9b6c60cbce4ac45e8ccd7934babff465e9769509.tar.bz2 |
bpo-31979: Simplify transforming decimals to ASCII (#4336)
in int(), float() and complex() parsers.
This also speeds up parsing non-ASCII numbers by around 20%.
Diffstat (limited to 'Lib/test/test_float.py')
-rw-r--r-- | Lib/test/test_float.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index a16c05c..17174dd 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -51,7 +51,7 @@ class GeneralFloatCases(unittest.TestCase): self.assertRaises(TypeError, float, {}) self.assertRaisesRegex(TypeError, "not 'dict'", float, {}) # Lone surrogate - self.assertRaises(UnicodeEncodeError, float, '\uD8F0') + self.assertRaises(ValueError, float, '\uD8F0') # check that we don't accept alternate exponent markers self.assertRaises(ValueError, float, "-1.7d29") self.assertRaises(ValueError, float, "3D-14") |