@pytest.fixture(scope='module')
def ctx(sqlctx, people):
    try:
        df = sqlctx.createDataFrame(people)
    except __HOLE__:
        schema = sqlctx.inferSchema(people)
        schema.registerTempTable('t')
        schema.registerTempTable('t2')
    else:
        df2 = sqlctx.createDataFrame(people)
        sqlctx.registerDataFrameAsTable(df, 't')
        sqlctx.registerDataFrameAsTable(df2, 't2')
    return sqlctx
dataset/ETHPy150Open blaze/odo/odo/backends/tests/test_sparksql.py/ctx