summaryrefslogtreecommitdiff
path: root/tests/test_domain_py.py
diff options
context:
space:
mode:
authorEric Larson <larson.eric.d@gmail.com>2020-10-07 14:23:02 -0400
committerEric Larson <larson.eric.d@gmail.com>2020-10-07 14:25:24 -0400
commitd10802fa6ab7ca6f0e48c67b36da888da291d011 (patch)
tree7c018e2d4f20e9d61ca29bb0becef0d39ace6830 /tests/test_domain_py.py
parent0476e1cea93b587e3c0ab295aa20b2b9f0f81a34 (diff)
downloadsphinx-git-d10802fa6ab7ca6f0e48c67b36da888da291d011.tar.gz
TST: Add test
Diffstat (limited to 'tests/test_domain_py.py')
-rw-r--r--tests/test_domain_py.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py
index 8040af9cc..ceea51508 100644
--- a/tests/test_domain_py.py
+++ b/tests/test_domain_py.py
@@ -313,7 +313,7 @@ def test_pyfunction_signature(app):
def test_pyfunction_signature_full(app):
text = (".. py:function:: hello(a: str, b = 1, *args: str, "
- "c: bool = True, **kwargs: str) -> str")
+ "c: bool = True, d: tuple = (1, 2), **kwargs: str) -> str")
doctree = restructuredtext.parse(app, text)
assert_node(doctree, (addnodes.index,
[desc, ([desc_signature, ([desc_name, "hello"],
@@ -343,6 +343,14 @@ def test_pyfunction_signature_full(app):
[desc_sig_operator, "="],
" ",
[nodes.inline, "True"])],
+ [desc_parameter, ([desc_sig_name, "d"],
+ [desc_sig_punctuation, ":"],
+ " ",
+ [desc_sig_name, pending_xref, "tuple"],
+ " ",
+ [desc_sig_operator, "="],
+ " ",
+ [nodes.inline, "(1, 2)"])],
[desc_parameter, ([desc_sig_operator, "**"],
[desc_sig_name, "kwargs"],
[desc_sig_punctuation, ":"],