Exemple #1
0
def test_scalar_symbols():
    exprs = [x, y]
    scalars = scalar_symbols(exprs)

    assert len(scalars) == len(exprs)
    assert isdistinct([s._name for s in scalars])
    assert builtins.all(s.dshape == e.schema for s, e in zip(scalars, exprs))
Exemple #2
0
def test_scalar_symbols():
    exprs = [x, y]
    scalars = scalar_symbols(exprs)

    assert len(scalars) == len(exprs)
    assert isdistinct([s._name for s in scalars])
    assert builtins.all(s.dshape == e.schema for s, e in zip(scalars, exprs))
Exemple #3
0
def test_date_attribute_completion():
    t = symbol('t', '5 * {name: string, when: datetime}')
    assert 'day' in dir(t.when)
    assert 'day' not in dir(t.name)
    assert not builtins.all([x.startswith('__') and x.endswith('__')
                            for x in dir(t.name)])
Exemple #4
0
def test_date_attribute_completion():
    t = symbol("t", "5 * {name: string, when: datetime}")
    assert "day" in dir(t.when)
    assert "day" not in dir(t.name)
    assert not builtins.all([x.startswith("__") and x.endswith("__") for x in dir(t.name)])