Skip to content

Commit 6b6efc7

Browse files
authored
Filter aer warnings in deprecated FakeBackend V1 class (#13018)
* Filter aer warnings in fake backend for the deprecated V1 path * Filter warnings in QiskitTestCase instead of catching them
1 parent 1e7c10f commit 6b6efc7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/utils/base.py

+8
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ def setUpClass(cls):
156156
module="qiskit_aer",
157157
)
158158

159+
# Safe to remove once `FakeBackend` is removed (2.0)
160+
warnings.filterwarnings(
161+
"ignore", # If "default", it floods the CI output
162+
category=DeprecationWarning,
163+
message=r".*from_backend using V1 based backend is deprecated as of Aer 0.15*",
164+
module="qiskit.providers.fake_provider.fake_backend",
165+
)
166+
159167
allow_DeprecationWarning_message = [
160168
r"The property ``qiskit\.circuit\.bit\.Bit\.(register|index)`` is deprecated.*",
161169
]

0 commit comments

Comments
 (0)