From 7219a44e2a83c67a56d0e8ad757b00abfe0cec9a Mon Sep 17 00:00:00 2001 From: Yao Tang Date: Thu, 26 Oct 2023 15:44:32 +0100 Subject: [PATCH] Fix type error --- pytket/tests/qasm_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytket/tests/qasm_test.py b/pytket/tests/qasm_test.py index 1792d72d5e..cf76e88015 100644 --- a/pytket/tests/qasm_test.py +++ b/pytket/tests/qasm_test.py @@ -882,10 +882,10 @@ def test_register_name_check() -> None: qb = Qubit("Q", 0) c.add_qubit(qb) c.H(qb) - with pytest.raises(QASMUnsupportedError) as e: + with pytest.raises(QASMUnsupportedError) as e2: qasm = circuit_to_qasm_str(c) err_msg = "Invalid register name 'Q'" - assert err_msg in str(e.value) + assert err_msg in str(e2.value) if __name__ == "__main__":