Skip to content

Commit a5ccc7b

Browse files
committed
Fix merge for control flow tests.
1 parent 823dd27 commit a5ccc7b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

test/python/circuit/test_control_flow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ def test_can_add_op_with_captures_of_captures(self):
11201120
outer.box(inner.copy(), [0], [0])
11211121
added = outer.data[-1].operation
11221122
self.assertEqual(added.name, "box")
1123-
self.assertEqual(set(added.blocks[0].iter_captured_vars()), {a})
1123+
self.assertEqual(set(added.blocks[0].iter_captures()), {a, b})
11241124

11251125
def test_can_add_op_with_captures_of_locals(self):
11261126
"""Test circuit methods can capture declared variables."""
@@ -1160,7 +1160,7 @@ def test_can_add_op_with_captures_of_locals(self):
11601160
outer.box(inner.copy(), [0], [0])
11611161
added = outer.data[-1].operation
11621162
self.assertEqual(added.name, "box")
1163-
self.assertEqual(set(added.blocks[0].iter_captured_vars()), {a})
1163+
self.assertEqual(set(added.blocks[0].iter_captures()), {a, b})
11641164

11651165
def test_cannot_capture_unknown_variables_methods(self):
11661166
"""Control-flow operations should not be able to capture variables that don't exist in the
@@ -1251,4 +1251,3 @@ def test_cannot_capture_unknown_stretches_append(self):
12511251
)
12521252
with self.assertRaisesRegex(CircuitError, "not in this circuit"):
12531253
outer.append(BoxOp(inner.copy()), [0], [0])
1254-

0 commit comments

Comments
 (0)