Add traceback to Graph Tensor runtime error and update error message.
@@ -999,14 +999,14 @@ class SymbolicSupportTest(keras_parameterized.TestCase):
with tf.Graph().as_default():
x1 = tf.ones((3, 3))
x2 = tf.ones((3, 3))
- with self.assertRaisesRegex(TypeError, 'Graph tensors'):
+ with self.assertRaises(TypeError):
tf.matmul(x1, x2)
def test_mixing_numpy_arrays_and_graph_tensors(self):
with tf.Graph().as_default():
x1 = tf.ones((3, 3))
x2 = np.ones((3, 3), dtype='float32')
- with self.assertRaisesRegex(TypeError, 'Graph tensors'):
+ with self.assertRaises(TypeError):
tf.matmul(x1, x2)
@combinations.generate(combinations.combine(mode=['graph', 'eager']))
