Example #1
0
 def test_loops(self):
     (s1, n1) = make_proxy()
     (s2, n2) = make_proxy()
     g1 = SimpleNode(1,
             SimpleNode(11,
                  SimpleNode(111, n2),
                  SimpleNode(112),
                  n1),
             SimpleNode(12, n1))
     s1(g1)
     s2(next(iter(g1)))
     g2 = ConstructorWalker(g1, SimpleNode)(Clone())
     self.assert_same(repr(g1), repr(g2))
Example #2
0
 def test_loop(self):
     (s, n) = make_proxy()
     g1 = SimpleNode(1,
             SimpleNode(11,
                  SimpleNode(111),
                  SimpleNode(112),
                  n),
             SimpleNode(12))
     s(g1)
     g2 = ConstructorWalker(g1, SimpleNode)(Clone())
     self.assert_same(repr(g1), repr(g2))