Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST: Fix our usage of pytest ExceptionInfo.
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 ```python with pytest.raises(Exception) as exc ``` puts an [``ExceptionInfo``](https://docs.pytest.org/en/latest/reference.html#exceptioninfo) object into ``exc``, not the exception itself. We were trying ``exc`` like an exception object and relying on the fact that ``ExceptionInfo.__str__`` returned the same thing as ``exc.__str__`` would. The [pytest 5.0.0 release](https://docs.pytest.org/en/latest/changelog.html#pytest-5-0-0-2019-06-28) broke that assumption. See pytest-dev/pytest#5412.
- Loading branch information