Skip to content

Commit

Permalink
added a regression test for removing nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Henderson <[email protected]>
  • Loading branch information
timtadh committed Mar 21, 2018
1 parent c16f686 commit 942547a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ env3
MANIFEST
zss.egg-info
.tox
.pytest_cache
10 changes: 10 additions & 0 deletions zss/tests/test_regress.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,13 @@ def update(a,b):
)
assert dist == 814

def test_wrong_removal():
A = (
Node('a')
.addkid(Node('b'))
.addkid(Node('c'))
)
B = Node("a")
dist = simple_distance(A, B)
assert dist == 2

0 comments on commit 942547a

Please sign in to comment.