Skip to content

Commit f86d8b4

Browse files
13911 | Add ignoring of RuntimeWarning of aer in GenericBackendV2 test (#13912) (#13968)
* 13911 | Add ignoring of RuntimeWarning for GenericBackendV2 in test * 13911 | Move warning filtering to correct class (cherry picked from commit 20f83e5) Co-authored-by: Leander Cain Slotosch <79199855+LeanderCS@users.noreply.github.com>
1 parent 8a26423 commit f86d8b4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/utils/base.py

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

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

0 commit comments

Comments
 (0)