Пример #1
0
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
Пример #2
0
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
Пример #3
0
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], 'abc']]
    d = Data(data)
    assert 'abc' in repr(d.head())
Пример #4
0
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], 'abc']]
    d = Data(data)
    assert 'abc' in repr(d.head())
Пример #5
0
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], "abc"]]
    d = Data(data)
    assert "abc" in repr(d.head())