message: Add test case for error message of Dimension div (/)
diff: @@ -205,6 +205,23 @@ class DimensionTest(test_util.TensorFlowTestCase):
  reconstructed = ctor(*args)
  self.assertEquals(reconstructed, dim)
  + def testDiv(self):
  + # Note: This test is related to GitHub issue 25790.
  + six = tensor_shape.Dimension(6)
  + two = tensor_shape.Dimension(2)
  + message = (r"unsupported operand type\(s\) for \/: "
  + r"'Dimension' and 'Dimension', please use \/\/ instead")
  + with self.assertRaisesRegexp(TypeError, message):
  + _ = six / two
  + message = (r"unsupported operand type\(s\) for \/: "
  + r"'Dimension' and 'int', please use \/\/ instead")
  + with self.assertRaisesRegexp(TypeError, message):
  + _ = six / 2
  + message = (r"unsupported operand type\(s\) for \/: "
  + r"'int' and 'Dimension', please use \/\/ instead")
  + with self.assertRaisesRegexp(TypeError, message):
  + _ = 6 / two
  +
  class ShapeTest(test_util.TensorFlowTestCase):
  