From a3778c649c0c5f11a636bb90a2ae68e5d5fe1db5 Mon Sep 17 00:00:00 2001 From: Tres Popp Date: Wed, 3 Feb 2021 00:42:00 -0800 Subject: [PATCH] Add additional error string for non-broadcastable shapes For generated kernels in Tensorflow, the error message will be different, so add an additional string option. This error will be the same in every way to the previous error other than the exact message. PiperOrigin-RevId: 355341373 Change-Id: I4e8ee24df7e6e9072614d1c7a968c3a429bf7380 --- tensorflow/python/kernel_tests/cwise_ops_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/python/kernel_tests/cwise_ops_test.py b/tensorflow/python/kernel_tests/cwise_ops_test.py index bec30fafd3a..9dff254463f 100644 --- a/tensorflow/python/kernel_tests/cwise_ops_test.py +++ b/tensorflow/python/kernel_tests/cwise_ops_test.py @@ -219,7 +219,8 @@ class ComparisonOpTest(test.TestCase): with self.subTest(t=t, f=f): with self.assertRaisesRegex( (ValueError, errors.InvalidArgumentError), - "Incompatible shapes|Dimensions must be equal"): + "Incompatible shapes|Dimensions must be equal|" + "required broadcastable shapes"): f(x.astype(t), y.astype(t))