Skip to content
New issue

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

More exhaustive testing by property-based testing #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okapies
Copy link

@okapies okapies commented Feb 6, 2020

Add some test cases by using hypothesis, a property-based testing library. I also introduce textdistance as a test oracle and the test cases compare its results with those of it. It is still not enough (because I don't know very well about the details of the Unicode spec like combining characters) but they prove editdistance works for sentences consist of ASCII codes, Hiraganas, and Katakanas in a more precise way.

Note: I noticed that pyxDamerauLevenshtein referred by the benchmark is an implementation of Damerau-Levenshtein distance which supports transposition, unlike original Levenshtein algorithm (e.g. edit distance between "AB" and "BA" is 1 instead of 2 in DL). It seems it is not suitable for comparison.

@okapies okapies force-pushed the feature/property-testing branch 16 times, most recently from b81819b to 446777b Compare February 6, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant