summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_float.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-10-27 22:09:33 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-10-27 22:09:33 (GMT)
commit53e9fa4eed281dc7d1dc05ba359ee2d546a7500f (patch)
treee7b42b7629b9093bf0312709a866bd94dca27ada /Lib/test/test_float.py
parentbf1039d98ceb3dedfe98b8ae8c711db3e67f3e11 (diff)
downloadcpython-53e9fa4eed281dc7d1dc05ba359ee2d546a7500f.zip
cpython-53e9fa4eed281dc7d1dc05ba359ee2d546a7500f.tar.gz
cpython-53e9fa4eed281dc7d1dc05ba359ee2d546a7500f.tar.bz2
Test long inputs to float
Diffstat (limited to 'Lib/test/test_float.py')
-rw-r--r--Lib/test/test_float.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index 9d0c69d..86dae3f 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -32,6 +32,11 @@ class GeneralFloatCases(unittest.TestCase):
self.assertEqual(float(unicode(" 3.14 ")), 3.14)
self.assertEqual(float(unicode(" \u0663.\u0661\u0664 ",'raw-unicode-escape')), 3.14)
+ # extra long strings should no longer be a problem
+ # (in 2.6, long unicode inputs to float raised ValueError)
+ float('.' + '1'*1000)
+ float(unicode('.' + '1'*1000))
+
@test_support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE')
def test_float_with_comma(self):
# set locale to something that doesn't use '.' for the decimal point