Skip to content

Commit

Permalink
fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-imamichi committed Sep 27, 2022
1 parent ebcf87b commit 71ee01a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/python/primitives/test_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from qiskit import QuantumCircuit, pulse, transpile
from qiskit.circuit import Parameter
from qiskit.circuit.library import RealAmplitudes
from qiskit.exceptions import QiskitError
from qiskit.primitives import Sampler, SamplerResult
from qiskit.primitives.utils import _circuit_key
from qiskit.providers import JobStatus, JobV1
Expand Down Expand Up @@ -598,7 +599,9 @@ def test_run_errors(self):
with self.assertRaises(ValueError):
_ = sampler.run([qc3], [[]])
with self.subTest("no measurement"):
with self.assertRaises(ValueError):
with self.assertRaises(QiskitError):
# The following raises QiskitError because this check is located in
# `Sampler._preprocess_circuit`
_ = sampler.run([qc4], [[]])

def test_run_empty_parameter(self):
Expand Down

0 comments on commit 71ee01a

Please sign in to comment.