diff options
author | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-09-25 12:22:38 +0200 |
---|---|---|
committer | Jakob Lykke Andersen <Jakob@caput.dk> | 2021-10-02 12:41:40 +0200 |
commit | 3979bbad7fffda48f1e823acb516986104da12c9 (patch) | |
tree | df5d724032073cf89e33d6158c48afed9b9e3a62 /tests/test_domain_py.py | |
parent | 3a1bd32665b7dc9b459913ecc4e8122a8bc2660f (diff) | |
download | sphinx-git-3979bbad7fffda48f1e823acb516986104da12c9.tar.gz |
py nodes, PyVariable type
Diffstat (limited to 'tests/test_domain_py.py')
-rw-r--r-- | tests/test_domain_py.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index 840ba6828..edab4bfcc 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -534,7 +534,8 @@ def test_pydata_signature(app): doctree = restructuredtext.parse(app, text) assert_node(doctree, (addnodes.index, [desc, ([desc_signature, ([desc_name, "version"], - [desc_annotation, (": ", + [desc_annotation, ([desc_sig_punctuation, ':'], + desc_sig_space, [pending_xref, "int"])], [desc_annotation, " = 1"])], desc_content)])) @@ -560,7 +561,8 @@ def test_pydata_with_union_type_operator(app): doctree = restructuredtext.parse(app, text) assert_node(doctree[1][0], ([desc_name, "version"], - [desc_annotation, (": ", + [desc_annotation, ([desc_sig_punctuation, ':'], + desc_sig_space, [pending_xref, "int"], desc_sig_space, [desc_sig_punctuation, "|"], @@ -596,10 +598,11 @@ def test_pydata(app): addnodes.index, [desc, ([desc_signature, ([desc_addname, "example."], [desc_name, "var"], - [desc_annotation, (": ", + [desc_annotation, ([desc_sig_punctuation, ':'], + desc_sig_space, [pending_xref, "int"])])], [desc_content, ()])])) - assert_node(doctree[3][0][2][1], pending_xref, **{"py:module": "example"}) + assert_node(doctree[3][0][2][2], pending_xref, **{"py:module": "example"}) assert 'example.var' in domain.objects assert domain.objects['example.var'] == ('index', 'example.var', 'data', False) |