Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-21 08:40:12 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-03-22 11:10:00 +0300
commitb0a6b3f285359fd3637a0fc031bf462328e31f1b (patch)
tree374379538f9ff30c3c03912bab1ba825f10ebccc /sphinx/testing
parentdd85cb6588251ae824aeecde11d8a0e65315b126 (diff)
Close #7341: py domain: type annotations are converted to cross refs
Diffstat (limited to 'sphinx/testing')
-rw-r--r--sphinx/testing/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py
index 75cd0f411..450241f55 100644
--- a/sphinx/testing/util.py
+++ b/sphinx/testing/util.py
@@ -63,7 +63,7 @@ def assert_node(node: Node, cls: Any = None, xpath: str = "", **kwargs: Any) ->
'The node%s has %d child nodes, not one' % (xpath, len(node))
assert_node(node[0], cls[1:], xpath=xpath + "[0]", **kwargs)
elif isinstance(cls, tuple):
- assert isinstance(node, nodes.Element), \
+ assert isinstance(node, (list, nodes.Element)), \
'The node%s does not have any items' % xpath
assert len(node) == len(cls), \
'The node%s has %d child nodes, not %r' % (xpath, len(node), len(cls))