def test_hlookup(lkup, col_idx, result, approx): table = ( ('A', 'B', 'C'), (1, 2, 3), ('Z', 'Y', 'X'), ) assert result == hlookup(lkup, table, col_idx, approx)
def test_hlookup_vlookup_error(values, expected): assert hlookup(*values) == expected assert vlookup(*values) == expected