[Numpy-svn] r6257 - in branches/fix_float_format: . numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Mon Dec 29 23:36:03 CST 2008


Author: cdavid
Date: 2008-12-29 23:36:00 -0600 (Mon, 29 Dec 2008)
New Revision: 6257

Modified:
   branches/fix_float_format/
   branches/fix_float_format/numpy/core/tests/test_print.py
Log:
Merged revisions 6256 via svnmerge from 
http://svn.scipy.org/svn/numpy/trunk

........
  r6256 | cdavid | 2008-12-30 14:34:22 +0900 (Tue, 30 Dec 2008) | 1 line
  
  Special case float tests on windows: python 2.5 and below have >=3 digits in the exp.
........



Property changes on: branches/fix_float_format
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6244,6251,6253
   + /branches/distutils-revamp:1-2752 /branches/dynamic_cpu_configuration:1-6101 /branches/multicore:1-3687 /branches/numpy-mingw-w64:1-6150 /branches/visualstudio_manifest:1-6077 /trunk:1-6244,6251,6253,6256

Modified: branches/fix_float_format/numpy/core/tests/test_print.py
===================================================================
--- branches/fix_float_format/numpy/core/tests/test_print.py	2008-12-30 05:34:22 UTC (rev 6256)
+++ branches/fix_float_format/numpy/core/tests/test_print.py	2008-12-30 05:36:00 UTC (rev 6257)
@@ -14,7 +14,11 @@
         assert_equal(str(tp(1e10)), str(float('1e10')),
                      err_msg='Failed str formatting for type %s' % tp)
     else:
-        assert_equal(str(tp(1e10)), '1e+10',
+        if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5:
+            ref = '1e+010'
+        else:
+            ref = '1e+10'
+        assert_equal(str(tp(1e10)), ref,
                      err_msg='Failed str formatting for type %s' % tp)
 
 def test_float_types():
@@ -57,7 +61,11 @@
         assert_equal(str(tp(1e10)), str(complex(1e10)),
                      err_msg='Failed str formatting for type %s' % tp)
     else:
-        assert_equal(str(tp(1e10)), '(1e+10+0j)',
+        if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5:
+            ref = '(1e+010+0j)'
+        else:
+            ref = '(1e+10+0j)'
+        assert_equal(str(tp(1e10)), ref,
                      err_msg='Failed str formatting for type %s' % tp)
 
 def test_complex_types():



More information about the Numpy-svn mailing list