summaryrefslogtreecommitdiff
path: root/numpy/testing/tests
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-09-30 17:59:13 -0600
committerGitHub <noreply@github.com>2017-09-30 17:59:13 -0600
commitd05fd3032cccabf5ed18840b43513a73499af5d6 (patch)
treea9a1d760547e5983c59400249bc8086d73e191c2 /numpy/testing/tests
parent697609cbb3b49dac0a61370ce7c8cd9b320fc43b (diff)
parent448bb82e6f6ad5d6ff98705a55fe34ccd938446c (diff)
downloadnumpy-d05fd3032cccabf5ed18840b43513a73499af5d6.tar.gz
Merge pull request #9645 from xoviat/appveyor
ENH: enable OpenBLAS on windows.
Diffstat (limited to 'numpy/testing/tests')
-rw-r--r--numpy/testing/tests/test_utils.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 1a2a621ea..c440d8eca 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -267,15 +267,18 @@ class TestEqual(TestArrayEqual):
try:
self._assert_func(np.array([1, 2]), np.matrix([1, 2]))
except AssertionError as e:
- self.assertEqual(
- str(e),
- "\nArrays are not equal\n\n"
- "(shapes (2,), (1, 2) mismatch)\n"
- " x: array([1, 2])\n"
- " y: [repr failed for <matrix>: The truth value of an array "
- "with more than one element is ambiguous. Use a.any() or "
- "a.all()]")
-
+ msg = str(e)
+ msg2 = msg.replace("shapes (2L,), (1L, 2L)", "shapes (2,), (1, 2)")
+ msg_reference = "\nArrays are not equal\n\n" \
+ "(shapes (2,), (1, 2) mismatch)\n" \
+ " x: array([1, 2])\n" \
+ " y: [repr failed for <matrix>: The truth value of an array " \
+ "with more than one element is ambiguous. Use a.any() or " \
+ "a.all()]"
+ try:
+ self.assertEqual(msg, msg_reference)
+ except AssertionError:
+ self.assertEqual(msg2, msg_reference)
class TestArrayAlmostEqual(_GenericTest, unittest.TestCase):