コード例 #1
0
ファイル: test_builtins.py プロジェクト: pgoelz/xonsh
def test_list_of_strs_or_callables():
    f = lambda x: 20
    cases = [(['yo'], 'yo'), (['yo'], ['yo']), (['42'], 42), (['42'], [42]),
             ([f], f), ([f], [f])]
    for exp, inp in cases:
        obs = list_of_strs_or_callables(inp)
        yield assert_equal, exp, obs
コード例 #2
0
ファイル: test_builtins.py プロジェクト: BlaXpirit/xonsh
def test_list_of_strs_or_callables():
    f = lambda x: 20
    cases = [(['yo'], 'yo'), (['yo'], ['yo']), (['42'], 42), (['42'], [42]),
             ([f], f), ([f], [f])]
    for exp, inp in cases:
        obs = list_of_strs_or_callables(inp)
        assert exp == obs
コード例 #3
0
ファイル: test_builtins.py プロジェクト: zennsocial/xonsh
def test_list_of_strs_or_callables(exp, inp):
    obs = list_of_strs_or_callables(inp)
    assert exp == obs
コード例 #4
0
ファイル: test_builtins.py プロジェクト: jhdulaney/xonsh
def test_list_of_strs_or_callables(exp, inp):
    obs = list_of_strs_or_callables(inp)
    assert exp == obs