[Python-checkins] r75883 - python/trunk/Lib/test/test_float.py
mark.dickinson
python-checkins at python.org
Tue Oct 27 23:09:33 CET 2009
Author: mark.dickinson
Date: Tue Oct 27 23:09:33 2009
New Revision: 75883
Log:
Test long inputs to float
Modified:
python/trunk/Lib/test/test_float.py
Modified: python/trunk/Lib/test/test_float.py
==============================================================================
--- python/trunk/Lib/test/test_float.py (original)
+++ python/trunk/Lib/test/test_float.py Tue Oct 27 23:09:33 2009
@@ -32,6 +32,11 @@
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
More information about the Python-checkins
mailing list