aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/autograph/converters/logical_expressions_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/autograph/converters/logical_expressions_test.py')
-rw-r--r--tensorflow/contrib/autograph/converters/logical_expressions_test.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tensorflow/contrib/autograph/converters/logical_expressions_test.py b/tensorflow/contrib/autograph/converters/logical_expressions_test.py
index 48186024a9..ca07de5e8a 100644
--- a/tensorflow/contrib/autograph/converters/logical_expressions_test.py
+++ b/tensorflow/contrib/autograph/converters/logical_expressions_test.py
@@ -31,10 +31,8 @@ class GradientsFunctionTest(converter_testing.TestCase):
def test_fn(a, b):
return a == b
- node = self.parse_and_analyze(test_fn, {})
- node = logical_expressions.transform(node, self.ctx)
-
- with self.compiled(node, math_ops.equal) as result:
+ with self.converted(test_fn, logical_expressions, {},
+ math_ops.equal) as result:
with self.test_session() as sess:
self.assertTrue(sess.run(result.test_fn(1, 1)))
self.assertFalse(sess.run(result.test_fn(1, 2)))
@@ -44,11 +42,8 @@ class GradientsFunctionTest(converter_testing.TestCase):
def test_fn(a, b, c):
return (a or b) and (a or b or c)
- node = self.parse_and_analyze(test_fn, {})
- node = logical_expressions.transform(node, self.ctx)
-
- with self.compiled(node, math_ops.logical_or,
- math_ops.logical_and) as result:
+ with self.converted(test_fn, logical_expressions, {}, math_ops.logical_or,
+ math_ops.logical_and) as result:
with self.test_session() as sess:
self.assertTrue(sess.run(result.test_fn(True, False, True)))