diff options
Diffstat (limited to 'tensorflow/python/framework/importer_test.py')
-rw-r--r-- | tensorflow/python/framework/importer_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tensorflow/python/framework/importer_test.py b/tensorflow/python/framework/importer_test.py index c4ccc3d189..2b2398f833 100644 --- a/tensorflow/python/framework/importer_test.py +++ b/tensorflow/python/framework/importer_test.py @@ -685,6 +685,17 @@ class ImportGraphDefTest(test.TestCase): self.assertEqual("return_elements must be a list of strings.", str(e.exception)) + def testDuplicateOperationNames(self): + with ops.Graph().as_default(): + with self.assertRaises(ValueError) as e: + importer.import_graph_def( + self._MakeGraphDef(""" + node { name: 'A' op: 'Oi' } + node { name: 'B' op: 'Oi' } + node { name: 'A' op: 'Oi' } + """)) + self.assertEqual("Duplicate name 'A' in GraphDef.", str(e.exception)) + def testWithExtensionAndAttr(self): with ops.Graph().as_default() as g: c = constant_op.constant(5.0, dtype=dtypes.float32, name="c") |