diff --git a/python/markupever/dom.py b/python/markupever/dom.py index f3f336e..928ea0b 100644 --- a/python/markupever/dom.py +++ b/python/markupever/dom.py @@ -229,12 +229,12 @@ def last_child(self) -> typing.Optional["BaseNode"]: @property def has_siblings(self) -> bool: """Returns `True` if the node has sibling.""" - return self._raw.has_siblings + return self._raw.has_siblings() @property def has_children(self) -> bool: """Returns `True` if the node has children.""" - return self._raw.has_children + return self._raw.has_children() def tree(self) -> "TreeDom": """Returns the TreeDom instance representing the tree to which this node is connected.""" diff --git a/python/tests/test_dom.py b/python/tests/test_dom.py index 7220e41..02b3491 100644 --- a/python/tests/test_dom.py +++ b/python/tests/test_dom.py @@ -162,8 +162,10 @@ def test_connect_node(): assert p.text(strip=True) == "content 1content 2" assert p.text(separator="\t", strip=True) == "content 1\tcontent 2" - assert text.has_siblings - assert p.has_children + assert text.has_siblings is True + assert p.has_children is True + assert text.has_children is False + assert root.has_siblings is False assert p.tree() == dom assert (