Exemplo 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)
Exemplo n.º 2
0
 def __len__(self):
     """ Return amount of child nodes. """
     return int(core.get_children_count(self._cursor, self.id))
Exemplo n.º 3
0
 def has_children(self):
     """ Return whether immediate children exist. """
     return core.get_children_count(self._cursor, self.id) > 0
Exemplo n.º 4
0
 def __len__(self):
     """ Return amount of child nodes. """
     return int(core.get_children_count(self._cursor, self.id))
Exemplo 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)