fix: replace list.delete
call by the proper remove
method
This commit is contained in:
parent
dc22cf823f
commit
bc8084af97
2 changed files with 6 additions and 6 deletions
|
@ -33,11 +33,11 @@ def test_adding_elements():
|
||||||
|
|
||||||
|
|
||||||
def test_adding_one_removing_one():
|
def test_adding_one_removing_one():
|
||||||
assert merge_features(["A", "B"], ["A", "C"], ["A", "B", "D"]) == [
|
assert merge_features(["A", "B"], ["A", "C"], ["A", "B", "D"]) == ["A", "C", "D"]
|
||||||
"A",
|
|
||||||
"C",
|
|
||||||
"D",
|
def test_removing_one():
|
||||||
]
|
assert merge_features(["A", "B"], ["A", "B", "C"], ["A", "D"]) == ["A", "C", "D"]
|
||||||
|
|
||||||
|
|
||||||
def test_removing_same_element():
|
def test_removing_same_element():
|
||||||
|
|
|
@ -156,7 +156,7 @@ def merge_features(reference: list, latest: list, incoming: list):
|
||||||
|
|
||||||
# Reapply the changes on top of the latest.
|
# Reapply the changes on top of the latest.
|
||||||
for item in removed:
|
for item in removed:
|
||||||
merged.delete(item)
|
merged.remove(item)
|
||||||
|
|
||||||
for item in added:
|
for item in added:
|
||||||
merged.append(item)
|
merged.append(item)
|
||||||
|
|
Loading…
Reference in a new issue