diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-10-24 17:52:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-24 17:52:22 +0900 |
commit | 071b14884c90e807827079ee18b1677ea71833e6 (patch) | |
tree | 1de573844f20b52873a753c674368c2ffef07a7f | |
parent | 68753b879ab0ab9f625786cb412e87c9c91be4fd (diff) | |
parent | d10802fa6ab7ca6f0e48c67b36da888da291d011 (diff) | |
download | sphinx-git-071b14884c90e807827079ee18b1677ea71833e6.tar.gz |
Merge pull request #8303 from larsoner/tuple
TST: Add test
-rw-r--r-- | tests/test_domain_py.py | 10 |
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, ":"], |