Exemplo n.º 1
0
def test_core_compute(db, data):
    assert isinstance(compute(db.nyc, data, return_type='core'), pd.DataFrame)
    assert isinstance(
        compute(db.nyc.passenger_count, data, return_type='core'), pd.Series)
    assert iscorescalar(
        compute(db.nyc.passenger_count.mean(), data, return_type='core'))
    assert isinstance(compute(db.nyc, data, return_type=list), list)
Exemplo n.º 2
0
def test_core_compute(nyc):
    t = symbol('t', discover(nyc))
    assert isinstance(compute(t, nyc, return_type='core'), pd.DataFrame)
    assert isinstance(compute(t.passenger_count, nyc, return_type='core'),
                      pd.Series)
    assert iscorescalar(
        compute(t.passenger_count.mean(), nyc, return_type='core'))
    assert isinstance(compute(t, nyc, return_type=list), list)
Exemplo n.º 3
0
def test_core_compute(nyc):
    t = symbol('t', discover(nyc))
    assert isinstance(compute(t, nyc, return_type='core'), pd.DataFrame)
    assert isinstance(compute(t.passenger_count, nyc, return_type='core'), pd.Series)
    assert iscorescalar(compute(t.passenger_count.mean(), nyc, return_type='core'))
    assert isinstance(compute(t, nyc, return_type=list), list)
Exemplo n.º 4
0
def test_iscorescalar(data, res):
    assert iscorescalar(data) == res
Exemplo n.º 5
0
def test_core_compute(db, data):
    assert isinstance(compute(db.nyc, data, return_type='core'), pd.DataFrame)
    assert isinstance(compute(db.nyc.passenger_count, data, return_type='core'), pd.Series)
    assert iscorescalar(compute(db.nyc.passenger_count.mean(), data, return_type='core'))
    assert isinstance(compute(db.nyc, data, return_type=list), list)
Exemplo n.º 6
0
def test_core_compute(ctx, db):
    assert isinstance(compute(db.t, ctx, return_type='core'), pd.DataFrame)
    assert isinstance(compute(db.t.amount, ctx, return_type='core'), pd.Series)
    assert iscorescalar(compute(db.t.amount.mean(), ctx, return_type='core'))
    assert isinstance(compute(db.t, ctx, return_type=list), list)
Exemplo n.º 7
0
def test_iscorescalar(data, res):
    assert iscorescalar(data) == res
Exemplo n.º 8
0
def test_core_compute(ctx, db):
    assert isinstance(compute(db.t, ctx, return_type='core'), pd.DataFrame)
    assert isinstance(compute(db.t.amount, ctx, return_type='core'), pd.Series)
    assert iscorescalar(compute(db.t.amount.mean(), ctx, return_type='core'))
    assert isinstance(compute(db.t, ctx, return_type=list), list)