Exemplo n.º 1
0
def test_is_named_tuple():
    passes = (collections.namedtuple('Test', list('abc'))(1, 2, 3), )
    fails = ((1, 2, 3), 'a', Series({'pi': 3.14}))

    for p in passes:
        assert inference.is_named_tuple(p)

    for f in fails:
        assert not inference.is_named_tuple(f)
Exemplo n.º 2
0
def test_is_named_tuple():
    passes = (collections.namedtuple('Test', list('abc'))(1, 2, 3), )
    fails = ((1, 2, 3), 'a', Series({'pi': 3.14}))

    for p in passes:
        assert inference.is_named_tuple(p)

    for f in fails:
        assert not inference.is_named_tuple(f)
Exemplo n.º 3
0
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
Exemplo n.º 4
0
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)
Exemplo n.º 5
0
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
Exemplo n.º 6
0
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)