aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework/ops_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/framework/ops_test.py')
-rw-r--r--tensorflow/python/framework/ops_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/python/framework/ops_test.py b/tensorflow/python/framework/ops_test.py
index 2d0a6cbf8a..01841e6306 100644
--- a/tensorflow/python/framework/ops_test.py
+++ b/tensorflow/python/framework/ops_test.py
@@ -1315,6 +1315,12 @@ class GraphTest(test_util.TensorFlowTestCase):
def _AssertDefault(self, expected):
self.assertIs(expected, ops.get_default_graph())
+ def testResetDefaultGraphNesting(self):
+ g0 = ops.Graph()
+ with self.assertRaises(AssertionError):
+ with g0.as_default():
+ ops.reset_default_graph()
+
def testGraphContextManager(self):
g0 = ops.Graph()
with g0.as_default() as g1: