We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I match the string value, the result is incorrect.
============================= test session starts ============================= collecting ... collected 3 items test_lookup.py::test_match_for_string[1-lookup_array0-1-3] test_lookup.py::test_match_for_string[B-lookup_array1-1-3] PASSED [ 33%]FAILED [ 66%] tests\lib\test_lookup.py:403 (test_match_for_string[B-lookup_array1-1-3]) 5 != 3 Expected :3 Actual :5 <Click to see difference> lookup_value = 'B', lookup_array = ['A', None, 'B', None, 'C', None, ...] match_type = 1, expected = 3 @pytest.mark.parametrize( 'lookup_value, lookup_array, match_type, expected', ( (1, [None, None, 1, 3.3, 5, None, None], 1, 3), ('B', ['A', None, 'B', None, 'C', None, 'D'], 1, 3), (1, [2, None, 1, 3.3, 5, None, None], 1, 3), )) def test_match_for_string(lookup_value, lookup_array, match_type, expected): lookup_row = (tuple(lookup_array),) lookup_col = tuple((i,) for i in lookup_array) > assert match(lookup_value, lookup_row, match_type) == expected E AssertionError: assert 5 == 3 E + where 5 = match('B', (('A', None, 'B', None, 'C', None, ...),), 1) test_lookup.py:413: AssertionError PASSED [100%] test_lookup.py::test_match_for_string[1-lookup_array2-1-3] =================== 1 failed, 2 passed, 1 warning in 0.29s ====================
The text was updated successfully, but these errors were encountered:
It looks not a problem, it's a misuse of "bisect_right()"
array Out[13]: ('A', None, 'B', None, 'C', None, 'D') value Out[14]: ExcelCmp(cmp_type=1, value='A', empty='') bisect_right(array, value, lo=0, hi=len(array)) Out[15]: 6
Sorry, something went wrong.
No branches or pull requests
Problem description
When I match the string value, the result is incorrect.
What actually happened
The text was updated successfully, but these errors were encountered: