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)
def test_is_names_tuple_fails(ll): assert not inference.is_named_tuple(ll)
def test_is_names_tuple_passes(ll): assert inference.is_named_tuple(ll)