Getting different ratios between program and test code #222
Replies: 1 comment 2 replies
-
From your description rapidfuzz is called with the same input in both cases and it is called in exactly the same manner. In this case I would not expect any differences in the results either. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using rapidFuzz as a means to give a search bar some fuzzy matching logic. While testing my code, I noticed that I am getting different ratio values between the tests and my actual program.
For example, I have now set my python code up to print tuples containing the two strings that are being compared, as well as their ratio value. Meaning, when I make a search in the browser from the client, I am printing these values to my terminal. And when I run my test suite against this feature, it also prints these same values. The problem is, I am getting a difference of almost 10% between my client side making a fuzzy search and my test suite making a fuzzy search. Basically, my client side code is running great and the library is working as it should. But in my test suite, since the ratio value is 10% lower, I'm not getting back the true expected results, thus failing a test that should be passing.
Example:
Any clue on why this could be happening? Is it a python or rapidFuzz thing?
Beta Was this translation helpful? Give feedback.
All reactions