Description
The followint test: pytest -m acceptance -k "test_libmodule[typing.py]"
Fail with the following stacktrace:
def child_sequence(self, child):
"""Search for the sequence that contains this child.
:param child: The child node to search sequences for.
:type child: NodeNG
:returns: The sequence containing the given child node.
:rtype: iterable(NodeNG)
:raises AstroidError: If no sequence could be found that contains
the given child.
"""
for field in self._astroid_fields:
node_or_sequence = getattr(self, field)
if node_or_sequence is child:
return [node_or_sequence]
# /!\ compiler.ast Nodes have an __iter__ walking over child nodes
if (
isinstance(node_or_sequence, (tuple, list))
and child in node_or_sequence
):
return node_or_sequence
msg = "Could not find %s in %s's children"
> raise exceptions.AstroidError(msg % (repr(child), repr(self)))
E astroid.exceptions.AstroidError: Could not find
<ClassDef.Hashable_typing l.0 at 0x7fa3ceac21f0> in <Module._collections_abc l.0 at 0x7fa3cea020a0>'s children