Skip to content

Commit

Permalink
Fix incorrect editops results
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Oct 21, 2021
1 parent c8bf132 commit 2422d8a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
14 changes: 7 additions & 7 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@software{max_bachmann_2021_5501155,
@software{max_bachmann_2021_5584996,
author = {Max Bachmann},
title = {maxbachmann/RapidFuzz: Release 1.6.1},
month = sep,
title = {maxbachmann/RapidFuzz: Release 1.8.0},
month = oct,
year = 2021,
publisher = {Zenodo},
version = {v1.6.1},
doi = {10.5281/zenodo.5501155},
url = {https://doi.org/10.5281/zenodo.5501155}
}
version = {v1.8.0},
doi = {10.5281/zenodo.5584996},
url = {https://doi.org/10.5281/zenodo.5584996}
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.0
1.8.1
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Max Bachmann'

# The full version, including alpha/beta/rc tags
release = '1.8.0'
release = '1.8.1'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/rapidfuzz-cpp
2 changes: 1 addition & 1 deletion src/rapidfuzz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"""
__author__ = "Max Bachmann"
__license__ = "MIT"
__version__ = "1.8.0"
__version__ = "1.8.1"

from rapidfuzz import process, fuzz, utils, levenshtein, string_metric
11 changes: 8 additions & 3 deletions tests/test_string_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ def test_levenshtein_editops():
"""
basic test for levenshtein_editops
"""
assert string_metric.levenshtein_editops("0", "") == [("delete", 1, 0)]
assert string_metric.levenshtein_editops("", "0") == [("insert", 0, 1)]
assert string_metric.levenshtein_editops("0", "") == [("delete", 0, 0)]
assert string_metric.levenshtein_editops("", "0") == [("insert", 0, 0)]
assert string_metric.levenshtein_editops("qabxcd", "abycdf") == [
("delete", 1, 0), ("replace", 4, 3), ("insert", 6, 6)
("delete", 0, 0), ("replace", 3, 2), ("insert", 6, 5)
]
assert string_metric.levenshtein_editops("Lorem ipsum.", "XYZLorem ABC iPsum") == [
("insert", 0, 0), ("insert", 0, 1), ("insert", 0, 2), ("insert", 5, 8),
("insert", 5, 9), ("insert", 5, 10), ("insert", 5, 11), ("replace", 7, 14),
("delete", 11, 18)
]

def test_help():
Expand Down

0 comments on commit 2422d8a

Please sign in to comment.