Skip to content

Commit

Permalink
update assertion in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShellyGarion committed Nov 13, 2024
1 parent 1bb0616 commit 8949f7f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/python/synthesis/test_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1487,9 +1487,8 @@ def __array__(self, dtype=None):
def inverse(self, annotated: bool = False):
return CustomXYGate(-self.params[0])

with self.assertRaises(QiskitError) as exc:
_ = TwoQubitControlledUDecomposer(CustomXYGate)
self.assertIn("Specialization: ControlledEquiv calculated fidelity", exc.exception.message)
with self.assertRaisesRegex(QiskitError, "ControlledEquiv calculated fidelity"):
TwoQubitControlledUDecomposer(CustomXYGate)


class TestDecomposeProductRaises(QiskitTestCase):
Expand Down

0 comments on commit 8949f7f

Please sign in to comment.