diff options
author | 2018-09-17 13:24:29 -0700 | |
---|---|---|
committer | 2018-09-17 13:34:57 -0700 | |
commit | a768624f1d0ae3629caf5b9784b4b6911b881c18 (patch) | |
tree | f7581648c47b4ad95d10099f4485e5f41463f767 /tensorflow/contrib/framework | |
parent | d7b4bf68dc80f1abf90bd6b857f079157028a861 (diff) |
Move from deprecated self.test_session() to self.cached_session().
self.test_session() has been deprecated in 9962eb5e84b15e309410071b06c2ed2d6148ed44 as its name confuses readers of the test. Moving to cached_session() instead which is more explicit about:
* the fact that the session may be reused.
* the session is not closed even when doing a "with self.test_session()" statement.
PiperOrigin-RevId: 213326581
Diffstat (limited to 'tensorflow/contrib/framework')
-rw-r--r-- | tensorflow/contrib/framework/python/framework/tensor_util_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/framework/python/framework/tensor_util_test.py b/tensorflow/contrib/framework/python/framework/tensor_util_test.py index b1820c10c8..9b0b9b1e1b 100644 --- a/tensorflow/contrib/framework/python/framework/tensor_util_test.py +++ b/tensorflow/contrib/framework/python/framework/tensor_util_test.py @@ -186,7 +186,7 @@ class WithShapeTest(test.TestCase): unexpected_shapes) def test_with_shape_2x2_with_partial_expected_shape(self): - with self.test_session(): + with self.cached_session(): value = [[42, 43], [44, 45]] actual_shape = [2, 2] tensor = constant_op.constant(value, shape=actual_shape) |