

def test_gets_execution_info_in_resolver():
    encountered_schema = [None]
    encountered_root_value = [None]

    def resolve_type(obj, info):
        encountered_schema[0] = info.schema
        encountered_root_value[0] = info.root_value
        return PersonType2
    NamedType2 = GraphQLInterfaceType(name='Named', fields={
        'name': GraphQLField(GraphQLString),
    }, resolve_type=resolve_type)
    PersonType2 = GraphQLObjectType(name='Person', interfaces=[NamedType2], fields={
        'name': GraphQLField(GraphQLString),
        'friends': GraphQLField(GraphQLList(NamedType2)),
    })
    schema2 = GraphQLSchema(query=PersonType2)
    john2 = Person('John', [], [liz])
    ast = parse('{ name, friends { name } }')
    result = execute(john2, john2, ast)
    assert (result.data == {
        'name': 'John',
        'friends': [{
            'name': 'Liz',
        }],
    })
    assert (encountered_schema[0] == schema2)
    assert (encountered_root_value[0] == john2)

dataset/ETHPy150Open graphql-python/graphql-core/tests/core_execution/test_union_interface.py test_gets_execution_info_in_resolver/VarMisuse@155/248 `schema2`->`john2`