summaryrefslogtreecommitdiff
path: root/numpy/testing/tests/test_utils.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-05-27 20:17:52 +0300
committermattip <matti.picus@gmail.com>2019-05-27 20:50:29 +0300
commit0d3d1b172b7f4c4775cd12138ec56edfac8a6dc2 (patch)
tree05f0330a74d66d5c3825bfeddbfcab1062e32506 /numpy/testing/tests/test_utils.py
parentc976a9a44c08acf153723392906811d55294b8b4 (diff)
downloadnumpy-0d3d1b172b7f4c4775cd12138ec56edfac8a6dc2.tar.gz
BUG: special case object arrays when printing rel-, abs-error
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r--numpy/testing/tests/test_utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 643d143ee..4247b6589 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -343,6 +343,13 @@ class TestEqual(TestArrayEqual):
except AssertionError:
assert_equal(msg2, msg_reference)
+ def test_object(self):
+ #gh-12942
+ import datetime
+ a = np.array([datetime.datetime(2000, 1, 1),
+ datetime.datetime(2000, 1, 2)])
+ self._test_not_equal(a, a[::-1])
+
class TestArrayAlmostEqual(_GenericTest):