Skip to content

13911 | Add ignoring of RuntimeWarning of aer in GenericBackendV2 test#13912

Merged
ElePT merged 2 commits intoQiskit:mainfrom
LeanderCS:13911
Feb 28, 2025
Merged

13911 | Add ignoring of RuntimeWarning of aer in GenericBackendV2 test#13912
ElePT merged 2 commits intoQiskit:mainfrom
LeanderCS:13911

Conversation

@LeanderCS
Copy link
Copy Markdown
Contributor

@LeanderCS LeanderCS commented Feb 22, 2025

Summary

Because the aer isn't available on all envs, the test logs get flooded with sometimes meaningless DeprecationWarnings.

This PR adds that the affected class's error gets ignored in the tests.

Fixes #13911

@LeanderCS LeanderCS requested review from a team and jyu00 as code owners February 22, 2025 17:59
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Feb 22, 2025
@qiskit-bot
Copy link
Copy Markdown
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@LeanderCS LeanderCS changed the title 13911 | Add ignoring of RuntimeWarning for GenericBackendV2 in test 13911 | Add ignoring of RuntimeWarning for aer in GenericBackendV2 test Feb 22, 2025
@LeanderCS LeanderCS changed the title 13911 | Add ignoring of RuntimeWarning for aer in GenericBackendV2 test 13911 | Add ignoring of RuntimeWarning of aer in GenericBackendV2 test Feb 22, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 22, 2025

Pull Request Test Coverage Report for Build 13530727959

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.007%) to 87.983%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 92.98%
Totals Coverage Status
Change from base Build 13512719904: 0.007%
Covered Lines: 77510
Relevant Lines: 88097

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi LeanderCS, thanks for your contribution. If you read the issue carefully, you will notice that the proposed course of action is not stopping the issue of warnings inside the GenericBackendV2 class, but modifying the base test configuration to filter the warnings only during our unit test process. If you'd like to contribute to that, please revert the current change and apply the filter in the unit test base class.

@LeanderCS LeanderCS force-pushed the 13911 branch 2 times, most recently from d4fe035 to 6fb5ebe Compare February 25, 2025 20:51
@LeanderCS
Copy link
Copy Markdown
Contributor Author

@ElePT Do I understand it correctly, that you want the ignoring to be added inside of test/utils/base.py?

Why would the ignoring in the affected test be not suitable?

Copy link
Copy Markdown
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I read the changes too quickly and assumed the filter was in the class not the test, so my previous comment didn't fully make sense. Let me clarify: the approach was not incorrect, but because the generic backend is widely used in other unit tests (and those were the ones causing the flooding of the logs), it's more efficient to have the filter in the base test class. LGTM, and thanks again.

@ElePT ElePT added this pull request to the merge queue Feb 28, 2025
Merged via the queue into Qiskit:main with commit 20f83e5 Feb 28, 2025
@LeanderCS LeanderCS deleted the 13911 branch February 28, 2025 16:32
@ElePT
Copy link
Copy Markdown
Contributor

ElePT commented Mar 7, 2025

@Mergifyio backport stable/1.4

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Mar 7, 2025

backport stable/1.4

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Mar 7, 2025
#13912)

* 13911 | Add ignoring of RuntimeWarning for GenericBackendV2 in test

* 13911 | Move warning filtering to correct class

(cherry picked from commit 20f83e5)
github-merge-queue Bot pushed a commit that referenced this pull request Mar 7, 2025
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Filter Aer not found warning in tests

4 participants