def test_assert_equal_graph_def(self):
    with tf.Graph().as_default() as g:
        def_empty = g.as_graph_def()
        tf.constant(5, name='five')
        tf.constant(7, name='seven')
        def_57 = g.as_graph_def()
    with tf.Graph().as_default() as g:
        tf.constant(7, name='seven')
        tf.constant(5, name='five')
        def_75 = g.as_graph_def()
    self.assertNotEqual(str(def_57), str(def_75))
    tf.test.assert_equal_graph_def(def_57, def_75)
    with self.assertRaisesRegexp(AssertionError, "^Found unexpected node 'seven"):
        tf.test.assert_equal_graph_def(def_57, def_empty)
def test_assert_equal_graph_def(self):
    with tf.Graph().as_default() as g:
        def_empty = g.as_graph_def()
        tf.constant(5, name='five')
        tf.constant(7, name='seven')
        def_57 = g.as_graph_def()
    with tf.Graph().as_default() as g:
        tf.constant(7, name='seven')
        tf.constant(5, name='five')
        def_75 = g.as_graph_def()
    self.assertNotEqual(str(def_57), str(def_75))
    tf.test.assert_equal_graph_def(def_57, def_75)
    with self.assertRaisesRegexp(AssertionError, "^Found unexpected node 'seven"):
        tf.test.assert_equal_graph_def(def_57, def_empty)