summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-30 05:34:22 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-30 05:34:22 +0000
commit02b0f1951332140dedf8c2cceedc6af3ae74059f (patch)
tree2775f54849b6396b858889f7bf7d97d801ee0cf2
parent90ebbb8e4e37c2d6562735a5192d3116de2621ac (diff)
downloadnumpy-02b0f1951332140dedf8c2cceedc6af3ae74059f.tar.gz
Special case float tests on windows: python 2.5 and below have >=3 digits in the exp.
-rw-r--r--numpy/core/tests/test_print.py12
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():