Skip to content

Commit

Permalink
Fix for loop that reassigns the iterable it is iterating
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 19, 2022
1 parent 14aec16 commit 15d1920
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unittest_inference_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ class B(A):
A.method(B()) #@
"""
)
expected = ["A", "A", "B", "B", "B"]
for node, expected in zip(nodes_, expected):
expected_names = ["A", "A", "B", "B", "B"]
for node, expected in zip(nodes_, expected_names):
assert isinstance(node, nodes.NodeNG)
inferred = node.inferred()
assert len(inferred) == 1
Expand Down Expand Up @@ -553,8 +553,8 @@ class B(A):
B.method() #@
"""
)
expected = ["A", "A", "B", "B"]
for node, expected in zip(nodes_, expected):
expected_names = ["A", "A", "B", "B"]
for node, expected in zip(nodes_, expected_names):
assert isinstance(node, nodes.NodeNG)
inferred = node.inferred()
assert len(inferred) == 1
Expand Down

0 comments on commit 15d1920

Please sign in to comment.