summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--giscanner/mallardwriter.py2
-rw-r--r--tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page3
2 files changed, 4 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index 5fd97048..a7154b59 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -121,7 +121,7 @@ class MallardFormatter(object):
return to_underscores(string)
def get_class_hierarchy(self, node):
- parent_chain = []
+ parent_chain = [node]
while node.parent:
node = self._transformer.lookup_giname(str(node.parent))
diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
index 3fd51259..cab691e7 100644
--- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
+++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.page
@@ -22,6 +22,9 @@ obj = DocExamples.Obj(<link xref='DocExamples.Obj-property-example'>property_exa
<tree>
<item>
<code>GObject.Object</code>
+ <item>
+ <code>DocExamples.Obj</code>
+ </item>
</item>
</tree>
</synopsis>