From 4eec00cd4b8b8a3a46322dd044095829c11f1224 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 18 Apr 2018 01:32:37 +0000 Subject: [PATCH] Remove unneeded for loop for bool data types in tests Signed-off-by: Yong Tang --- tensorflow/python/kernel_tests/py_func_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow/python/kernel_tests/py_func_test.py b/tensorflow/python/kernel_tests/py_func_test.py index 54ab5ab..7a17861 100644 --- a/tensorflow/python/kernel_tests/py_func_test.py +++ b/tensorflow/python/kernel_tests/py_func_test.py @@ -76,12 +76,12 @@ class PyFuncTest(test.TestCase): def testBoolDataTypes(self): def and_func(x, y): return x and y - for dtype in [np.bool]: - with self.test_session(): - x = constant_op.constant(True, dtype=dtype) - y = constant_op.constant(False, dtype=dtype) - z = self.evaluate(script_ops.py_func(and_func, [x, y], dtype)) - self.assertEqual(z, dtype(False)) + dtype = dtypes.bool + with self.test_session(): + x = constant_op.constant(True, dtype=dtype) + y = constant_op.constant(False, dtype=dtype) + z = self.evaluate(script_ops.py_func(and_func, [x, y], dtype)) + self.assertEqual(z, False) def testSingleType(self): with self.test_session(): -- 2.7.4