diff options
author | David Cournapeau <cournape@gmail.com> | 2008-12-30 05:36:00 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-12-30 05:36:00 +0000 |
commit | 5e3b3d2b6c7fc861d1443a95d2c2de52d5aca31a (patch) | |
tree | cca10e35f8cd7a173d1c188f9e27ab7cd39d5b70 /numpy | |
parent | 044d8a30cf0e628f1bf0b7560bd90689ea11d0ee (diff) | |
parent | 02b0f1951332140dedf8c2cceedc6af3ae74059f (diff) | |
download | numpy-5e3b3d2b6c7fc861d1443a95d2c2de52d5aca31a.tar.gz |
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.
........
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/tests/test_print.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/core/tests/test_print.py b/numpy/core/tests/test_print.py index fe78ddf0c..c6ce27bc3 100644 --- a/numpy/core/tests/test_print.py +++ b/numpy/core/tests/test_print.py @@ -14,7 +14,11 @@ def check_float_type(tp): 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 @@ def check_complex_type(tp): 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(): |