Exemplo n.º 1
0
 def test_add_two_children(self):
     node = Note(5)
     child0 = Node(parent=node)
     child1 = Node(parent=node)
     node.add_child(child0)
     node.add_child(child1)
     self.assertIs(node.children[0], child0)
     self.assertIs(node.children[1], child1)
Exemplo n.º 2
0
 def test_add_two_children(self):
     node = Note(5)
     child0 = Node(parent=node)
     child1 = Node(parent=node)
     node.add_child(child0)
     node.add_child(child1)
     self.assertIs(node.children[0], child0)
     self.assertIs(node.children[1], child1)
Exemplo n.º 3
0
 def test_add_one_child(self):
     node = Note(5)
     child = Node(parent=node)
     node.add_child(child)
     self.assertIs(node.children[0], child)
Exemplo n.º 4
0
 def test_add_one_child(self):
     node = Note(5)
     child = Node(parent=node)
     node.add_child(child)
     self.assertIs(node.children[0], child)