summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/tests/test_print.py6
-rw-r--r--numpy/lib/tests/test_io.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/tests/test_print.py b/numpy/core/tests/test_print.py
index 09b20cc3e..d40275ef4 100644
--- a/numpy/core/tests/test_print.py
+++ b/numpy/core/tests/test_print.py
@@ -87,7 +87,7 @@ def test_complex_types():
def test_complex_inf_nan():
"""Check inf/nan formatting of complex types."""
- if sys.version_info >= (2, 6):
+ if sys.version_info[:2] >= (2, 6):
TESTS = {
complex(np.inf, 0): "(inf+0j)",
complex(0, np.inf): "inf*j",
@@ -198,7 +198,7 @@ def test_complex_type_print():
for t in [np.complex64, np.cdouble, np.clongdouble] :
yield check_complex_type_print, t
-@dec.skipif(sys.version_info < (2,6))
+@dec.skipif(sys.version_info[:2] < (2, 6))
def test_scalar_format():
"""Test the str.format method with NumPy scalar types"""
tests = [('{0}', True, np.bool_),
@@ -216,7 +216,7 @@ def test_scalar_format():
('{0:g}', 1.5, np.float64),
('{0:g}', 1.5, np.longdouble)]
# Python 2.6 doesn't implement complex.__format__
- if sys.version_info <= (2,6):
+ if sys.version_info[:2] > (2, 6):
tests += [('{0:g}', 1.5+0.5j, np.complex64),
('{0:g}', 1.5+0.5j, np.complex128),
('{0:g}', 1.5+0.5j, np.clongdouble)]
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index c62e586b5..8922070df 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -18,7 +18,7 @@ from numpy.compat import asbytes, asbytes_nested, bytes
from nose import SkipTest
from numpy.ma.testutils import (TestCase, assert_equal, assert_array_equal,
assert_raises, run_module_suite)
-from numpy.testing import assert_warns, assert_
+from numpy.testing import assert_warns, assert_, build_err_msg
if sys.version_info[0] >= 3:
from io import BytesIO
@@ -321,10 +321,10 @@ def _assert_floatstr_lines_equal(actual_lines, expected_lines):
of this function.
"""
for actual, expected in zip(actual_lines, expected_lines):
- if not actual == expected:
+ if actual != expected:
expected_win25 = expected.replace("e+00", "e+000")
- if not actual == expected_win25:
- msg = build_err_msg([actual, desired], verbose=True)
+ if actual != expected_win25:
+ msg = build_err_msg([actual, expected], '', verbose=True)
raise AssertionError(msg)