Skip to content

Commit 20f83e5

Browse files
authored
13911 | Add ignoring of RuntimeWarning of aer in GenericBackendV2 test (Qiskit#13912)
* 13911 | Add ignoring of RuntimeWarning for GenericBackendV2 in test * 13911 | Move warning filtering to correct class
1 parent b9bdc5a commit 20f83e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/utils/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ def setUpClass(cls):
9494
warnings.filterwarnings("error", category=DeprecationWarning)
9595
warnings.filterwarnings("error", category=QiskitWarning)
9696

97+
warnings.filterwarnings(
98+
"ignore",
99+
category=RuntimeWarning,
100+
message="Aer not found using BasicSimulator and no noise",
101+
module="qiskit.providers.fake_provider.generic_backend_v2",
102+
)
103+
97104
# Numpy 2 made a few new modules private, and have warnings that trigger if you try to
98105
# access attributes that _would_ have existed. Unfortunately, Python's `warnings` module
99106
# adds a field called `__warningregistry__` to any module that triggers a warning, and

0 commit comments

Comments
 (0)