[Numpy-svn] r6303 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Thu Jan 8 10:30:05 CST 2009


Author: chanley
Date: 2009-01-08 10:30:01 -0600 (Thu, 08 Jan 2009)
New Revision: 6303

Modified:
   trunk/numpy/core/tests/test_print.py
Log:
Fix test_print.py function _test_locale_independance() since str(1.2) does not use the LC_NUMERIC locale to convert numbers.  Fix from Mark Sienkiewicz.

Modified: trunk/numpy/core/tests/test_print.py
===================================================================
--- trunk/numpy/core/tests/test_print.py	2009-01-08 15:11:32 UTC (rev 6302)
+++ trunk/numpy/core/tests/test_print.py	2009-01-08 16:30:01 UTC (rev 6303)
@@ -154,7 +154,7 @@
         else:
             locale.setlocale(locale.LC_NUMERIC, 'FRENCH')
 
-        assert_equal(str(tp(1.2)), str(float(1.2)),
+        assert_equal(locale.format("%f",tp(1.2)), locale.format("%f",float(1.2)),
                      err_msg='Failed locale test for type %s' % tp)
     finally:
         locale.setlocale(locale.LC_NUMERIC, locale=curloc)



More information about the Numpy-svn mailing list