[Python-checkins] r75886 - in python/branches/release31-maint: Lib/test/test_float.py

mark.dickinson python-checkins at python.org
Tue Oct 27 23:13:18 CET 2009


Author: mark.dickinson
Date: Tue Oct 27 23:13:18 2009
New Revision: 75886

Log:
Merged revisions 75885 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r75885 | mark.dickinson | 2009-10-27 22:12:20 +0000 (Tue, 27 Oct 2009) | 9 lines
  
  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
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/test/test_float.py

Modified: python/branches/release31-maint/Lib/test/test_float.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_float.py	(original)
+++ python/branches/release31-maint/Lib/test/test_float.py	Tue Oct 27 23:13:18 2009
@@ -34,8 +34,12 @@
         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


More information about the Python-checkins mailing list