PY3 Migration - make assertAllEqual() in test_util.py py3 compatible.
PiperOrigin-RevId: 280732222 Change-Id: I205f6b929e032db5cd24dccb7a04ba49f0a8521b
This commit is contained in:
parent
2644f1a2e8
commit
c5d29fbf04
@ -2608,6 +2608,8 @@ class TensorFlowTestCase(googletest.TestCase):
|
||||
x, y = a, b
|
||||
msgs.append("not equal lhs = {}".format(x))
|
||||
msgs.append("not equal rhs = {}".format(y))
|
||||
# With Python 3, we need to make sure the dtype matches between a and b.
|
||||
b = b.astype(a.dtype)
|
||||
np.testing.assert_array_equal(a, b, err_msg="\n".join(msgs))
|
||||
|
||||
@py_func_if_in_function
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user