-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
str(err) on pytest.raises does not yield the exception message any more #5528
Comments
you want this was intentionally changed in 5.0.0, see the changelog: https://pytest.readthedocs.io/en/latest/changelog.html#removals |
Access to exception message with str(info.value) Cf. pytest-dev/pytest#5528 Fixes #269
Indeed! It seems your question has been resolved so I'm closing this for now. Feel free to followup with further questions. |
Sure! I will update my tests to fix this. And many thanks for the quick response! |
btw, the reason you only hit this in python3.8 is it appears you're not actually installing pytest and just relying on travis's preinstalled version |
Access to exception message with str(info.value) Cf. pytest-dev/pytest#5528 Fixes #269
Thanks for working on this beautiful project!
I use pytest extensively to test a project of mine, and I find that
pytest-5.0.0
, in combination withPython 3.8.0b1+
, does not give the exception message any more if I applystr(err)
to an exceptionerr
captured withpytest.raises
.A few days ago I was using
pytest-4.6.3
with the same version of Python 3.8 dev and had no such issue.A code like this one should be enough to reproduce the issue:
The full details of what happens in the context of my project are available at mwouts/jupytext#269.
The text was updated successfully, but these errors were encountered: