def test_lookup(lookup_value, result1, result2): assert result1 == lookup(lookup_value, lookup_vector) assert result1 == lookup(lookup_value, tuple(zip(*lookup_vector))) assert result2 == lookup(lookup_value, lookup_vector, lookup_result) assert result2 == lookup(lookup_value, tuple(zip(*lookup_vector)), tuple(zip(*lookup_result))) assert result2 == lookup(lookup_value, lookup_rows) assert result2 == lookup(lookup_value, lookup_columns)
def test_lookup_error(): assert NA_ERROR == lookup(1, 1)