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
Cleanup TestError #2177
Merged
Merged
Cleanup TestError #2177
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o a Python type `TestError` was unnecessary here. It was used to fail the test if a signal could not be mapped to a Python SimHandle type. This could be easily done with a standard exception. This cleans up the last usage of `TestError` in core code and will allow for it's deprecation.
ktbarrett
added
the
type:cleanup
cleanup or refactoring on code, documentation, or other areas
label
Nov 5, 2020
TestError is no longer used internally, and it was never a good idea for a user to raise a TestError rather than a TestFailure, so it is being deprecated.
ktbarrett
commented
Nov 5, 2020
eric-wieser
reviewed
Nov 5, 2020
`assert_raises` causes 2 warnings. One for calling into the deprecated `assert_raises` and another for instantiating the deprecated `TestError`.
eric-wieser
reviewed
Nov 5, 2020
Decided against this, the stacklevel and message would be off. |
eric-wieser
reviewed
Nov 5, 2020
eric-wieser
reviewed
Nov 5, 2020
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
eric-wieser
reviewed
Nov 5, 2020
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
marlonjames
reviewed
Nov 5, 2020
marlonjames
reviewed
Nov 5, 2020
cmarqu
added
the
status:needs-newsfragment
Needs a towncrier newsfragment for the changelog
label
Nov 5, 2020
Should have a |
Co-authored-by: Marlon James <marlon.james@garmin.com>
ktbarrett
removed
the
status:needs-newsfragment
Needs a towncrier newsfragment for the changelog
label
Nov 8, 2020
cmarqu
approved these changes
Nov 8, 2020
cmarqu
pushed a commit
to cmarqu/cocotb
that referenced
this pull request
Nov 17, 2020
* Use a more appropriate exception when a GPI object cannot be mapped to a Python type `TestError` was unnecessary here. It was used to fail the test if a signal could not be mapped to a Python SimHandle type. This could be easily done with a standard exception. This cleans up the last usage of `TestError` in core code and will allow for it's deprecation. * Deprecate TestError TestError is no longer used internally, and it was never a good idea for a user to raise a TestError rather than a TestFailure, so it is being deprecated. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Marlon James <marlon.james@garmin.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TestError
was unnecessary here. It was used to fail the test if a signal could not be mapped to a Python SimHandle type. This could be easily done with a standard exception. This cleans up the last usage ofTestError
in core code and will allow for it's deprecation.Closes #2174.