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

Fix checking for deprecation warnings to use assertWarns() #14145

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Apr 1, 2025

  • I have added the tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Summary

Fix the deprecation warning check to use the correct assertWarns() method rather than assertRaises() that is used to test for exceptions. This fixes the test suite when it is run without -Werror.

Details and comments

Since this is merely a change in tests, I don't think it needs a changelog entry.

Fix the deprecation warning check to use the correct `assertWarns()`
method rather than `assertRaises()` that is used to test for exceptions.
This fixes the test suite when it is run without `-Werror`.
@mgorny mgorny requested a review from a team as a code owner April 1, 2025 07:00
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Apr 1, 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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 14189273004

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 88.052%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.23%
crates/qasm2/src/lex.rs 7 91.73%
Totals Coverage Status
Change from base Build 14175885620: 0.04%
Covered Lines: 72803
Relevant Lines: 82682

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks - these are definitely just straight-up mistakes.

@jakelishman jakelishman enabled auto-merge April 1, 2025 07:42
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: None Do not include in changelog labels Apr 1, 2025
@jakelishman jakelishman added this pull request to the merge queue Apr 1, 2025
@mgorny
Copy link
Contributor Author

mgorny commented Apr 1, 2025

Thanks!

Merged via the queue into Qiskit:main with commit 040c9c8 Apr 1, 2025
26 checks passed
mergify bot pushed a commit that referenced this pull request Apr 1, 2025
Fix the deprecation warning check to use the correct `assertWarns()`
method rather than `assertRaises()` that is used to test for exceptions.
This fixes the test suite when it is run without `-Werror`.

(cherry picked from commit 040c9c8)
github-merge-queue bot pushed a commit that referenced this pull request Apr 1, 2025
…#14146)

Fix the deprecation warning check to use the correct `assertWarns()`
method rather than `assertRaises()` that is used to test for exceptions.
This fixes the test suite when it is run without `-Werror`.

(cherry picked from commit 040c9c8)

Co-authored-by: Michał Górny <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo stable backport potential The bug might be minimal and/or import enough to be port to stable type: qa Issues and PRs that relate to testing and code quality
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants