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