コード例 #1
0
def test_column_map(fta, ftb):
    result = orca.column_map([fta, ftb], ['aa', 'by', 'bz'])
    assert result['a'] == ['aa']
    assert sorted(result['b']) == ['by', 'bz']

    result = orca.column_map([fta, ftb], ['by', 'bz'])
    assert result['a'] == []
    assert sorted(result['b']) == ['by', 'bz']
コード例 #2
0
def test_column_map_none(fta, ftb):
    assert orca.column_map([fta, ftb], None) == {'a': None, 'b': None}
コード例 #3
0
def test_column_map_raises(fta, ftb):
    with pytest.raises(RuntimeError):
        orca.column_map([fta, ftb], ['aa', 'by', 'bz', 'cw'])