Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

More exhaustive testing by property-based testing#43

Open
okapies wants to merge 1 commit into
roy-ht:masterfrom
okapies:feature/property-testing
Open

More exhaustive testing by property-based testing#43
okapies wants to merge 1 commit into
roy-ht:masterfrom
okapies:feature/property-testing

Conversation

@okapies
Copy link
Copy Markdown

@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
@okapies okapies force-pushed the feature/property-testing branch from 446777b to 7cad095 Compare February 8, 2020 04:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant