def test_head_compute(): data = tm.makeMixedDataFrame() t = symbol('t', discover(data)) db = into('sqlite:///:memory:::t', data, dshape=t.dshape) n = 2 d = Data(db) # skip the header and the ... at the end of the repr expr = d.head(n) s = repr(expr) assert '...' not in s result = s.split('\n')[1:] assert len(result) == n
def test_head_compute(): data = tm.makeMixedDataFrame() t = symbol('t', discover(data)) db = into('sqlite:///:memory:::t', data, dshape=t.dshape) n = 2 d = Data(db) # skip the header and the ... at the end of the repr expr = d.head(n) s = repr(expr) assert '...' not in s result = s.split('\n')[1:] assert len(result) == n
def test_highly_nested_repr(): data = [[0, [[1, 2], [3]], 'abc']] d = Data(data) assert 'abc' in repr(d.head())
def test_highly_nested_repr(): data = [[0, [[1, 2], [3]], 'abc']] d = Data(data) assert 'abc' in repr(d.head())
def test_highly_nested_repr(): data = [[0, [[1, 2], [3]], "abc"]] d = Data(data) assert "abc" in repr(d.head())