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

Handle BaseException in pytest_exception_interact #22

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Handle BaseException in pytest_exception_interact #22

merged 1 commit into from
Mar 10, 2023

Conversation

ljodal
Copy link
Contributor

@ljodal ljodal commented Mar 8, 2023

When using pytest.raises() and the exception is not raised pytest will raise an exception of the Failed class, which inherits from BaseException, not Exception. This would cause an assertion error when recoding the span, which causes pytest to crash

When using pytest.raises() and the exception is not raised pytest will
raise an exception of the Failed class, which inherits from
BaseException, not Exception. This would cause an assertion error when
recoding the span, which causes pytest to crash
@chrisguidry
Copy link
Owner

Thank you, @ljodal, this change looks fundamentally good, but I think I've got some bitrot in the Github checks here that I'll need to debug, will get back to you soon.

@chrisguidry chrisguidry merged commit 0a3c179 into chrisguidry:main Mar 10, 2023
@chrisguidry
Copy link
Owner

Thanks @ljodal, this is just a bug with pre-commit and isort, nothing on your end. I'll get this sorted out and get a release together this morning.

@ljodal
Copy link
Contributor Author

ljodal commented Mar 10, 2023

Awesome, thanks!

We've also seen some problems with traces not being flushed, so we have a fix for that as well coming, probably next week. Just in case you want to wait and potentially include that in the release as well :)

@chrisguidry
Copy link
Owner

Awesome to hear, please keep them coming! I don't mind releasing each update individually, I'll get one out soon.

@chrisguidry
Copy link
Owner

https://pypi.org/project/pytest-opentelemetry/0.6.1/ 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants