aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/op_def_library_test.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-05-23 10:56:39 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-23 12:03:26 -0700
commit690bd7ebae1264da4cdb5d3acd9baf5ff5834cd7 (patch)
tree1b0028937744720e89c3e406cc3793adfb3ca9dd /tensorflow/python/ops/op_def_library_test.py
parenta17742641efac651737bc2c12c9065592436008b (diff)
Make TensorShape support equality with other types by returning NotImplemented. This is the least surprising behavior since equality works between arbitrary types in Python.
Change: 123021836
Diffstat (limited to 'tensorflow/python/ops/op_def_library_test.py')
-rw-r--r--tensorflow/python/ops/op_def_library_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/ops/op_def_library_test.py b/tensorflow/python/ops/op_def_library_test.py
index 2ec2e8b8e0..58d4cc7602 100644
--- a/tensorflow/python/ops/op_def_library_test.py
+++ b/tensorflow/python/ops/op_def_library_test.py
@@ -707,7 +707,7 @@ class OpDefLibraryTest(test_util.TensorFlowTestCase):
# "Don't know how to convert 5 to a TensorShapeProto for "
# "argument 'a'")
- with self.assertRaises(ValueError):
+ with self.assertRaises(TypeError):
self._lib.apply_op("AttrShape", a="ABC")
def testAttrShapeList(self):
@@ -774,7 +774,7 @@ class OpDefLibraryTest(test_util.TensorFlowTestCase):
# "Don't know how to convert 5 to a TensorShapeProto for "
# "argument 'a'")
- with self.assertRaises(ValueError) as cm:
+ with self.assertRaises(TypeError) as cm:
self._lib.apply_op("AttrPartialShape", a="ABC")
def testAttrPartialShapeList(self):