

def test_readonly_axis_blosc_to_sql(self):
    if (not _BLOSC_INSTALLED):
        raise nose.SkipTest('no blosc')
    if (not self._SQLALCHEMY_INSTALLED):
        raise nose.SkipTest('no sqlalchemy')
    expected = DataFrame({
        'A': list('abcd'),
    })
    df = self.encode_decode(expected, compress='blosc')
    eng = self._create_sql_engine('sqlite:///:memory:')
    df.to_sql('test', eng, if_exists='append')
    result = pandas.read_sql_table('test', eng, index_col='index')
    result.index.names = [None]
    assert_frame_equal(expected, result)

dataset/ETHPy150Open pydata/pandas/pandas/io/tests/test_packers.py TestCompression.test_readonly_axis_blosc_to_sql/original