aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/slice_op_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/kernel_tests/slice_op_test.py')
-rw-r--r--tensorflow/python/kernel_tests/slice_op_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/python/kernel_tests/slice_op_test.py b/tensorflow/python/kernel_tests/slice_op_test.py
index 40d384c623..c08d3222b3 100644
--- a/tensorflow/python/kernel_tests/slice_op_test.py
+++ b/tensorflow/python/kernel_tests/slice_op_test.py
@@ -107,7 +107,7 @@ class SliceTest(test.TestCase):
def testScalarInput(self):
input_val = 0
- with self.test_session() as sess:
+ with self.cached_session() as sess:
# Test with constant input; shape inference fails.
with self.assertRaisesWithPredicateMatch(ValueError, "out of range"):
constant_op.constant(input_val)[:].get_shape()
@@ -121,7 +121,7 @@ class SliceTest(test.TestCase):
def testInvalidIndex(self):
input_val = [1, 2]
- with self.test_session() as sess:
+ with self.cached_session() as sess:
# Test with constant input; shape inference fails.
with self.assertRaisesWithPredicateMatch(ValueError, "out of range"):
constant_op.constant(input_val)[1:, 1:].get_shape()