Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LeanderCS
Copy link
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 jyu00 and a team 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
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

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
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
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
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.

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: No status
Development

Successfully merging this pull request may close these issues.

Filter Aer not found warning in tests
4 participants