from blaze.api.table import Table, compute
from blaze.compute.core import compute
from blaze.compute.python import compute


data = (('Alice', 100),
        ('Bob', 200))

t = Table(data, columns=['name', 'amount'])

def test_resources():
    assert t.resources() == {t: t.data}


def test_compute():
    assert compute(t) == data

def test_compute():
    assert list(compute(t['amount'] + 1)) == [101, 201]

@@ -28,32 +28,69 @@
  Table, compute%0A
+from blaze.data.python import Python%0A
 from blaze.compu
@@ -104,32 +104,32 @@
  import compute%0A
-
 from blaze.compu
@@ -153,16 +153,45 @@
 compute%0A
+from datashape import dshape%0A
 %0A%0Adata =
@@ -391,16 +391,17 @@
 = data%0A%0A
+%0A
 def test
@@ -404,32 +404,32 @@
 test_compute():%0A
-
     assert list(
@@ -468,8 +468,427 @@
 1, 201%5D%0A
+%0A%0Adef test_create_with_raw_data():%0A    t = Table(data, columns=%5B'name', 'amount'%5D)%0A    assert t.schema == dshape('%7Bname: string, amount: int64%7D')%0A    assert t.name%0A    assert t.data == data%0A%0A%0Adef test_create_with_data_descriptor():%0A    schema='%7Bname: string, amount: int64%7D'%0A    ddesc = Python(data, schema=schema)%0A    t = Table(ddesc)%0A    assert t.schema == dshape(schema)%0A    assert t.name%0A    assert t.data == ddesc%0A

test constructors