Remove ndarray wrapper from TF Numpy. We return tensors directly.
@@ -351,9 +351,7 @@ class AutoCastVariableTest(tf.test.TestCase, parameterized.TestCase):
# mode. Variable.assign(...).op is None in Eager mode and an op in Graph
# mode or a tf.function. We test this is also true of AutoCastVariable.
if tf.executing_eagerly():
- with self.assertRaisesRegex(
- AttributeError,
- 'Tensor.op is meaningless when eager execution is enabled'):
+ with self.assertRaises(AttributeError):
x.op # pylint: disable=pointless-statement
self.assertIsNone(x.assign(1.0).op)
self.assertIsNone(x.assign_add(1.0).op)
