Example #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)
Example #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)
Example #3
0
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
Example #4
0
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)
Example #5
0
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
Example #6
0
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)