示例#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
文件: node.py 项目: jameshy/libtree
 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)