Skip to content

Commit d935f12

Browse files
committed
add tests for edit_distance
1 parent 9eee1a0 commit d935f12

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def build_extensions(self):
9090

9191
setup(
9292
name='pylcs',
93-
version='0.0.3',
93+
version='0.0.4',
9494
author='Meteorix',
9595
author_email='[email protected]',
9696
url='https://github.com/Meteorix/pylcs',

tests/test_pylcs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ def test_lcs2():
2424
def test_lcs2_of_list():
2525
assert pylcs.lcs2_of_list("aaa", ["aabbbaa"] * 10) == [2] * 10
2626
assert pylcs.lcs2_of_list("aaa你好", ["好呀你"] * 10) == [1] * 10
27+
28+
29+
def test_edit_distance():
30+
assert pylcs.edit_distance("aaa", "bbb") == 3
31+
assert pylcs.edit_distance("aaa", "aabbbaa") == 4
32+
assert pylcs.edit_distance("你好", "中国") == 2
33+
assert pylcs.edit_distance("aaa你好", "你好呀") == 4
34+

0 commit comments

Comments
 (0)