Skip to content

Commit f614978

Browse files
committed
fix
1 parent 6c89bb9 commit f614978

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

python/quantum-pecos/tests/guppy/test_multi_module_handling.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def single_hadamard() -> bool:
100100

101101
print(f"Single module test - Modules: {module_count}, Functions: {function_names}")
102102
assert module_count >= 1, "Should have at least one module"
103-
assert "single_hadamard" in function_names, "Should contain the main function"
103+
assert any(fn.endswith("single_hadamard") for fn in function_names), "Should contain the main function"
104104

105105

106106
def test_multiple_functions_compilation() -> None:
@@ -143,8 +143,10 @@ def single_qubit_test() -> bool:
143143
assert bell_modules >= 1, "Bell pair should have at least one module"
144144
assert single_modules >= 1, "Single qubit should have at least one module"
145145

146-
assert "create_bell_pair" in bell_functions, "Bell HUGR should contain create_bell_pair"
147-
assert "single_qubit_test" in single_functions, "Single HUGR should contain single_qubit_test"
146+
assert any(fn.endswith("create_bell_pair") for fn in bell_functions), "Bell HUGR should contain create_bell_pair"
147+
assert any(
148+
fn.endswith("single_qubit_test") for fn in single_functions
149+
), "Single HUGR should contain single_qubit_test"
148150

149151

150152
def test_compiler_comparison_simple() -> None:

python/quantum-pecos/tests/selene/test_hugr_to_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def my_quantum_circuit() -> bool:
179179
return measure(q)
180180

181181
ast = guppy_to_ast(my_quantum_circuit)
182-
assert ast.name == "my_quantum_circuit"
182+
assert ast.name.endswith("my_quantum_circuit")
183183

184184
def test_custom_allocator_name(self) -> None:
185185
"""Test custom allocator name."""

0 commit comments

Comments
 (0)