Skip to content

Commit

Permalink
Python domain test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TLouf committed Jan 3, 2023
1 parent 5cc07d6 commit caff655
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_domain_py.py
Expand Up @@ -9,7 +9,7 @@

from sphinx import addnodes
from sphinx.addnodes import (desc, desc_addname, desc_annotation, desc_content, desc_name,
desc_optional, desc_parameter, desc_parameter_line,
desc_optional, desc_parameter, desc_parameter_line,
desc_parameterlist, desc_returns, desc_sig_keyword,
desc_sig_literal_number, desc_sig_literal_string,
desc_sig_name, desc_sig_operator, desc_sig_punctuation, desc_sig_space, desc_signature, pending_xref)
Expand Down Expand Up @@ -1462,7 +1462,6 @@ def test_pyfunction_signature_with_python_maximum_signature_line_length(app):
[nodes.inline, pending_xref, "str"])]
assert_node(doctree[1][0][1], expected_sig)


text = (".. py:function:: hello(names: str) -> str\n"
" :single-line-signature:")
signame_node[1] = "names"
Expand All @@ -1474,11 +1473,10 @@ def test_pyfunction_signature_with_python_maximum_signature_line_length(app):

text = ".. py:function:: hello(names: str) -> str"
doctree = restructuredtext.parse(app, text)
expected_sig.insert(1, desc_parameter_line)
assert_node(doctree, expected_doctree)
assert_node(doctree[1], addnodes.desc, desctype="function",
domain="py", objtype="function", noindex=False)
expected_sig.insert(1, desc_parameter_line)

assert_node(doctree[1][0][1], expected_sig)


Expand Down

0 comments on commit caff655

Please sign in to comment.