Beispiel #1
0
 def test_col_some_names_only(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], ['bar']) == [1]
Beispiel #2
0
 def test_col_numbers_strings_only(self):
     assert mod.colnames_to_coloff0([], ['0', '3', '5']) == [0, 3, 5]
Beispiel #3
0
 def test_col_all_names_only(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'],
                                    ['foo', 'bar', 'baz']) == [0, 1, 2]
Beispiel #4
0
 def test_string_lookuplist_int_namelist(self):
     assert mod.colnames_to_coloff0(['0', '1', '2'], [0]) == [0]
Beispiel #5
0
 def test_int_lookuplist_string_namelist(self):
     assert mod.colnames_to_coloff0([0, 1, 2], ['0']) == [0]
Beispiel #6
0
 def test_col_numbers_only(self):
     assert mod.colnames_to_coloff0([], [0, 3, 5]) == [0, 3, 5]
Beispiel #7
0
 def test_col_numbers_only(self):
     assert mod.colnames_to_coloff0([], [0, 3, 5]) == [0, 3, 5]
Beispiel #8
0
 def test_col_mix_of_names_and_numbers(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], [0, 'bar', 'baz']) == [0, 1, 2]
Beispiel #9
0
 def test_error_number_not_found(self):
     with pytest.raises(KeyError):
         assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], [5])
Beispiel #10
0
 def test_col_all_names_only(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], ['foo', 'bar', 'baz']) == [0, 1, 2]
Beispiel #11
0
 def test_col_some_names_only(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], ['bar']) == [1]
Beispiel #12
0
 def test_col_numbers_strings_only(self):
     assert mod.colnames_to_coloff0([], ['0', '3', '5']) == [0, 3, 5]
Beispiel #13
0
 def test_int_lookuplist_string_namelist(self):
     assert mod.colnames_to_coloff0([0, 1, 2], ['0']) == [0]
Beispiel #14
0
 def test_string_lookuplist_int_namelist(self):
     assert mod.colnames_to_coloff0(['0', '1', '2'], [0]) == [0]
Beispiel #15
0
 def test_col_mix_of_names_and_numbers(self):
     assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'],
                                    [0, 'bar', 'baz']) == [0, 1, 2]
Beispiel #16
0
 def test_empty_lists(self):
     assert mod.colnames_to_coloff0([], []) == []
Beispiel #17
0
 def test_error_number_not_found(self):
     with pytest.raises(KeyError):
         assert mod.colnames_to_coloff0(['foo', 'bar', 'baz'], [5])
Beispiel #18
0
 def test_empty_lists(self):
     assert mod.colnames_to_coloff0([], []) == []