Skip to content

Commit

Permalink
Make test check more specific exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Nov 14, 2023
1 parent 5c90e25 commit 15af4e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/python/compiler/test_transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
from qiskit.test import QiskitTestCase, slow_test
from qiskit.tools import parallel
from qiskit.transpiler import CouplingMap, Layout, PassManager, TransformationPass
from qiskit.transpiler.exceptions import TranspilerError
from qiskit.transpiler.exceptions import TranspilerError, CircuitTooWideForTarget
from qiskit.transpiler.passes import BarrierBeforeFinalMeasurements, GateDirection, VF2PostLayout
from qiskit.transpiler.passmanager_config import PassManagerConfig
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager, level_0_pass_manager
Expand Down Expand Up @@ -987,7 +987,7 @@ def test_check_circuit_width(self):

qc = QuantumCircuit(15, 15)

with self.assertRaises(TranspilerError):
with self.assertRaises(CircuitTooWideForTarget):
transpile(qc, coupling_map=cmap)

@data(0, 1, 2, 3)
Expand Down

0 comments on commit 15af4e2

Please sign in to comment.