

def test_produces_helpful_error_messages():
    bad_ast = {
        'random': 'Data',
    }
    with raises(Exception) as excinfo:
        print_ast(bad_ast)
    assert ('Invalid AST Node' in str(bad_ast.value))

dataset/ETHPy150Open graphql-python/graphql-core/tests/core_language/test_printer.py test_produces_helpful_error_messages/VarMisuse@42/65 `excinfo`->`bad_ast`