aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/check_ops_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/kernel_tests/check_ops_test.py')
-rw-r--r--tensorflow/python/kernel_tests/check_ops_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/check_ops_test.py b/tensorflow/python/kernel_tests/check_ops_test.py
index 5a83ec8d30..7ef841c96b 100644
--- a/tensorflow/python/kernel_tests/check_ops_test.py
+++ b/tensorflow/python/kernel_tests/check_ops_test.py
@@ -88,6 +88,13 @@ class AssertEqualTest(test.TestCase):
out = array_ops.identity(small)
self.evaluate(out)
+ @test_util.run_in_graph_and_eager_modes()
+ def test_scalar_comparison(self):
+ const_true = constant_op.constant(True, name="true")
+ const_false = constant_op.constant(False, name="false")
+ with self.assertRaisesRegexp(errors.InvalidArgumentError, "fail"):
+ check_ops.assert_equal(const_true, const_false, message="fail")
+
def test_returns_none_with_eager(self):
with context.eager_mode():
small = constant_op.constant([1, 2], name="small")