message: Add tests for TensorSpec.name
diff: @@ -91,8 +91,12 @@ class TensorSpecTest(test_util.TensorFlowTestCase):
  self.assertFalse(desc.is_compatible_with(ints))
  def testName(self):
  - desc = tensor_spec.TensorSpec([1], dtypes.float32, name="beep")
  - self.assertEqual(desc.name, "beep")
  + # Note: "_" isn't a valid tensor name, but it is a valid python symbol
  + # name; and tf.function constructs TensorSpecs using function argument
  + # names.
  + for name in ["beep", "foo/bar:0", "a-b_c/d", "_"]:
  + desc = tensor_spec.TensorSpec([1], dtypes.float32, name=name)
  + self.assertEqual(desc.name, name)
  def testRepr(self):
  desc1 = tensor_spec.TensorSpec([1], dtypes.float32, name="beep")
  