aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/checkpointable/util_test.py
diff options
context:
space:
mode:
authorGravatar Allen Lavoie <allenl@google.com>2018-07-03 11:29:31 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-03 11:32:16 -0700
commitf46627f9ed9cd41b5a1ad9cebbdd4c240846c4e0 (patch)
tree1d6d0d6f6c517497e9dc08be6daf1562cb3afcf1 /tensorflow/python/training/checkpointable/util_test.py
parentbdd3a01d20ec6747cc6efc39fe42ed5f29d2c97e (diff)
Checkpointable: Fix dependency overwriting
When replacing a dependency with another using the same name, ensures that name lookup data structures are also updated. Fixes #20516. PiperOrigin-RevId: 203156155
Diffstat (limited to 'tensorflow/python/training/checkpointable/util_test.py')
-rw-r--r--tensorflow/python/training/checkpointable/util_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/training/checkpointable/util_test.py b/tensorflow/python/training/checkpointable/util_test.py
index 896ea47b97..3c1a4a6f83 100644
--- a/tensorflow/python/training/checkpointable/util_test.py
+++ b/tensorflow/python/training/checkpointable/util_test.py
@@ -102,7 +102,7 @@ class InterfaceTests(test.TestCase):
name="duplicate", initial_value=1.)
duplicate = checkpointable_utils.add_variable(
obj, name="duplicate", shape=[])
- with self.assertRaisesRegexp(ValueError, "'duplicate' already exists"):
+ with self.assertRaisesRegexp(ValueError, "'duplicate'.*already declared"):
checkpointable_utils.add_variable(obj, name="duplicate", shape=[])
self.evaluate(checkpointable_utils.gather_initializers(obj))