Esempio n. 1
0
def _filter_uninferable_nodes(elts, context):
    for elt in elts:
        if elt is util.Uninferable:
            yield nodes.Unknown()
        else:
            for inferred in elt.infer(context):
                if inferred is not util.Uninferable:
                    yield inferred
                else:
                    yield nodes.Unknown()
Esempio n. 2
0
def test_unknown():
    """Test Unknown node"""
    assert isinstance(next(nodes.Unknown().infer()), type(util.Uninferable))
    assert isinstance(nodes.Unknown().name, str)
    assert isinstance(nodes.Unknown().qname(), str)