summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-10-27 22:12:20 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-10-27 22:12:20 (GMT)
commita9023be8734242c14c6e9079b180d255fff94841 (patch)
treecb8d43b84620052811362880f87034b1c60c3fc8 /Lib
parentd430ebe1fd401ef9d0e1efa2354abedcf355135f (diff)
downloadcpython-a9023be8734242c14c6e9079b180d255fff94841.zip
cpython-a9023be8734242c14c6e9079b180d255fff94841.tar.gz
cpython-a9023be8734242c14c6e9079b180d255fff94841.tar.bz2
Merged revisions 75883 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75883 | mark.dickinson | 2009-10-27 22:09:33 +0000 (Tue, 27 Oct 2009) | 1 line Test long inputs to float ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_float.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index af5e13c..05783b0 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -34,8 +34,12 @@ class GeneralFloatCases(unittest.TestCase):
self.assertRaises(ValueError, float, ".")
self.assertRaises(ValueError, float, "-.")
self.assertEqual(float(b" \u0663.\u0661\u0664 ".decode('raw-unicode-escape')), 3.14)
+ # extra long strings should not be a problem
+ float(b'.' + b'1'*1000)
+ float('.' + '1'*1000)
@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
# float must not accept the locale specific decimal point but