Skip to content

Commit

Permalink
py domain: Add testcase for empty callable (refs: #9427)
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Jul 10, 2021
1 parent a671059 commit dd89c36
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_domain_py.py
Expand Up @@ -321,6 +321,15 @@ def test_parse_annotation(app):
[pending_xref, "int"],
[desc_sig_punctuation, "]"]))

doctree = _parse_annotation("Callable[[], int]", app.env)
assert_node(doctree, ([pending_xref, "Callable"],
[desc_sig_punctuation, "["],
[desc_sig_punctuation, "["],
[desc_sig_punctuation, "]"],
[desc_sig_punctuation, ", "],
[pending_xref, "int"],
[desc_sig_punctuation, "]"]))

doctree = _parse_annotation("List[None]", app.env)
assert_node(doctree, ([pending_xref, "List"],
[desc_sig_punctuation, "["],
Expand Down

0 comments on commit dd89c36

Please sign in to comment.