diff --git a/tensorflow_federated/python/tensorflow_libs/variable_utils_test.py b/tensorflow_federated/python/tensorflow_libs/variable_utils_test.py index 2eb5354440..cc286e8e37 100644 --- a/tensorflow_federated/python/tensorflow_libs/variable_utils_test.py +++ b/tensorflow_federated/python/tensorflow_libs/variable_utils_test.py @@ -226,7 +226,8 @@ def test_scalar_getitem_fails(self, value): value = tf.convert_to_tensor(value) tensor_variable = variable_utils.TensorVariable(value) with self.assertRaisesRegex( - tf.errors.InvalidArgumentError, 'Index out of range' + tf.errors.InvalidArgumentError, + 'Attempting to slice scalar input', ): _ = tensor_variable[0]