forked from openlp/openlp
Fix thinko: Three tests always evaluated to true by comparing a list with itself.
This commit is contained in:
parent
8de486f869
commit
1de79a0ec2
@ -139,7 +139,7 @@ class TestLib(TestCase):
|
|||||||
diff = [('replace', 0, 20, 0, 1), ('equal', 20, 29, 1, 10)]
|
diff = [('replace', 0, 20, 0, 1), ('equal', 20, 29, 1, 10)]
|
||||||
|
|
||||||
# WHEN: We remove the typos in there.
|
# WHEN: We remove the typos in there.
|
||||||
result = _remove_typos(diff)
|
result = _remove_typos(list(diff))
|
||||||
|
|
||||||
# THEN: There diff should not have changed.
|
# THEN: There diff should not have changed.
|
||||||
assert result == diff
|
assert result == diff
|
||||||
@ -168,7 +168,7 @@ class TestLib(TestCase):
|
|||||||
diff = [('equal', 0, 10, 0, 10), ('replace', 10, 20, 10, 1)]
|
diff = [('equal', 0, 10, 0, 10), ('replace', 10, 20, 10, 1)]
|
||||||
|
|
||||||
# WHEN: We remove the typos in there.
|
# WHEN: We remove the typos in there.
|
||||||
result = _remove_typos(diff)
|
result = _remove_typos(list(diff))
|
||||||
|
|
||||||
# THEN: There diff should not have changed.
|
# THEN: There diff should not have changed.
|
||||||
assert result == diff
|
assert result == diff
|
||||||
@ -201,7 +201,7 @@ class TestLib(TestCase):
|
|||||||
diff = [('equal', 0, 10, 0, 10), ('replace', 10, 20, 10, 11), ('equal', 20, 30, 11, 21)]
|
diff = [('equal', 0, 10, 0, 10), ('replace', 10, 20, 10, 11), ('equal', 20, 30, 11, 21)]
|
||||||
|
|
||||||
# WHEN: We remove the typos in there.
|
# WHEN: We remove the typos in there.
|
||||||
result = _remove_typos(diff)
|
result = _remove_typos(list(diff))
|
||||||
|
|
||||||
# THEN: There diff should not have changed.
|
# THEN: There diff should not have changed.
|
||||||
assert result == diff
|
assert result == diff
|
||||||
|
Loading…
Reference in New Issue
Block a user