diff options
Diffstat (limited to 'tensorflow/python/kernel_tests/base64_ops_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/base64_ops_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/kernel_tests/base64_ops_test.py b/tensorflow/python/kernel_tests/base64_ops_test.py index be96f45497..1b399942ef 100644 --- a/tensorflow/python/kernel_tests/base64_ops_test.py +++ b/tensorflow/python/kernel_tests/base64_ops_test.py @@ -48,7 +48,7 @@ class Base64OpsTest(test_util.TensorFlowTestCase): return base64_msg def _RunTest(self, msg, pad): - with self.test_session() as sess: + with self.cached_session() as sess: if pad: encoded, decoded = sess.run([self._encoded_t, self._decoded_t], feed_dict={self._msg: msg}) @@ -92,7 +92,7 @@ class Base64OpsTest(test_util.TensorFlowTestCase): encoded = string_ops.encode_base64(msg, pad=pad) decoded = string_ops.decode_base64(encoded) - with self.test_session() as sess: + with self.cached_session() as sess: encoded_value, decoded_value = sess.run([encoded, decoded]) self.assertEqual(encoded_value.shape, msg.shape) @@ -102,7 +102,7 @@ class Base64OpsTest(test_util.TensorFlowTestCase): def try_decode(enc): self._decoded_f.eval(feed_dict={self._encoded_f: enc}) - with self.test_session(): + with self.cached_session(): # Invalid length. msg = np.random.bytes(99) enc = base64.urlsafe_b64encode(msg) |