Esempio n. 1
0
def test_get_children_count(trans, cur, root):
    node = Node(trans, root)
    assert len(node) == core.get_children_count(cur, root.id)
Esempio n. 2
0
 def __len__(self):
     """ Return amount of child nodes. """
     return int(core.get_children_count(self._cursor, self.id))
Esempio n. 3
0
 def has_children(self):
     """ Return whether immediate children exist. """
     return core.get_children_count(self._cursor, self.id) > 0
Esempio n. 4
0
 def __len__(self):
     """ Return amount of child nodes. """
     return int(core.get_children_count(self._cursor, self.id))
Esempio n. 5
0
def test_get_children_count(trans, cur, root):
    node = Node(trans, root)
    assert len(node) == core.get_children_count(cur, root.id)