(self)
| 119 | assert "Kate" not in kate.siblings |
| 120 | |
| 121 | def test_copy_subtree(self) -> None: |
| 122 | tony: TreeNode = TreeNode() |
| 123 | michael: TreeNode = TreeNode(children={"Tony": tony}) |
| 124 | vito = TreeNode(children={"Michael": michael}) |
| 125 | |
| 126 | # check that children of assigned children are also copied (i.e. that ._copy_subtree works) |
| 127 | copied_tony = vito.children["Michael"].children["Tony"] |
| 128 | assert copied_tony is not tony |
| 129 | |
| 130 | def test_parents(self) -> None: |
| 131 | vito: TreeNode = TreeNode( |