Exemplo n.º 1
0
def test_convert_sas_to_dataframe():
    df = convert(pd.DataFrame, sasfile)
    assert isinstance(df, pd.DataFrame)

    # pandas doesn't support date
    expected = str(ds.measure).replace('date', 'datetime')

    assert str(discover(df).measure).replace('?', '') == expected
Exemplo n.º 2
0
def test_append_sas_to_sqlite_round_trip():
    expected = convert(set, sasfile)

    with tmpfile('db') as fn:
        r = resource('sqlite:///%s::SAS' % fn, dshape=discover(sasfile))
        append(r, sasfile)

        result = convert(set, r)

    assert expected == result
Exemplo n.º 3
0
def test_discover_sas():
    assert discover(sasfile) == ds