We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f82c669 commit 70e0163Copy full SHA for 70e0163
tests/compas/datastructures/test_tree.py
@@ -51,6 +51,15 @@ def test_tree_initialization():
51
assert tree.root is None
52
53
54
+def test_empty_tree():
55
+ tree = Tree()
56
+ assert tree.root is None
57
+ assert len(list(tree.nodes)) == 0
58
+ assert len(list(tree.leaves)) == 0
59
+ assert list(tree.traverse()) == []
60
+ assert tree.get_hierarchy_string() == ""
61
+
62
63
# =============================================================================
64
# TreeNode Properties
65
0 commit comments