TST: Fix our usage of pytest ExceptionInfo. #1225
Merged
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.
One test has started failing consistently on the OSX builds, and the
cause is a pytest major release that dropped on June 28. Travis' Ubuntu
virtual machines come with an older version of pytest included, and we do not
force it to upgrade, so we have only encountered this on the OSX builds
so far.
The usage
puts an
ExceptionInfo
object into
exc
, not the exception itself. We were tryingexc
like an exception object and relying on the fact that
ExceptionInfo.__str__
returned the same thing asexc.__str__
would. The
pytest 5.0.0 release
broke that assumption. See pytest-dev/pytest#5412.