コード例 #1
0
ファイル: test_inference.py プロジェクト: cmazzullo/pandas
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)
コード例 #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)
コード例 #3
0
ファイル: test_inference.py プロジェクト: yyonggonyy/pandas
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
コード例 #4
0
ファイル: test_inference.py プロジェクト: yyonggonyy/pandas
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)
コード例 #5
0
ファイル: test_inference.py プロジェクト: josham/pandas
def test_is_names_tuple_fails(ll):
    assert not inference.is_named_tuple(ll)
コード例 #6
0
ファイル: test_inference.py プロジェクト: josham/pandas
def test_is_names_tuple_passes(ll):
    assert inference.is_named_tuple(ll)