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