Пример #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)
Пример #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)
Пример #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)
Пример #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)