Lines Matching refs:n2

112         n2 = pytree.Node(1000, [n1, l3])
116 self.assertEqual(n2.get_suffix(), "")
120 n2 = pytree.Node(1000, [], context=(" ", (1, 0)))
121 self.assertEqual(n1, n2)
129 n2 = pytree.Node(1000, [l2])
130 self.assertEqual(n1, n2)
163 n2 = pytree.Node(1000, [l1, l2])
165 n1 = pytree.Node(1000, [n2, n3])
172 n2 = pytree.Node(1000, [l1, l2])
174 n1 = pytree.Node(1000, [n2, n3])
212 n2 = pytree.Node(1000, [n1])
215 self.assertFalse(n2.was_changed)
219 self.assertTrue(n2.was_changed)
242 n2 = pytree.Node(1000, [n1])
245 self.assertEqual(n2.children, [])
248 self.assertEqual(n2.parent, None)
250 self.assertTrue(n2.was_changed)
257 self.assertEqual(n2.parent, None)
259 self.assertTrue(n2.was_changed)
280 n2 = pytree.Node(1000, [l1])
281 n2.set_child(0, n1)
283 self.assertEqual(n1.parent, n2)
284 self.assertEqual(n2.parent, None)
285 self.assertEqual(n2.children, [n1])
325 n2 = pytree.Node(1000, [])
326 p1 = pytree.Node(1000, [n1, n2])
328 self.assertIs(n1.next_sibling, n2)
329 self.assertEqual(n2.next_sibling, None)
343 n2 = pytree.Node(1000, [])
344 p1 = pytree.Node(1000, [n1, n2])
346 self.assertIs(n2.prev_sibling, n1)
370 n2 = pytree.Node(1000, [l3])
371 root = pytree.Node(1000, [n1, n2])
379 self.assertFalse(pl.match(n2, results=r))
392 self.assertTrue(pn.match(n2, results=r))
393 self.assertEqual(r, {"pn": n2, "pl": l3})
406 n2 = pytree.Node(1000, [l3])
407 root = pytree.Node(1000, [n1, n2])
417 self.assertTrue(pw.match_seq([n2], r))
421 self.assertEqual(r["pn"], n2)
422 self.assertEqual(r["pw"], [n2])
424 self.assertEqual(r, {"pl": l1, "pn": n2, "pw": [n2]})