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

TST: Fix our usage of pytest ExceptionInfo. #1225

Merged
merged 1 commit into from Jul 2, 2019

Commits on Jul 2, 2019

  1. 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.
    danielballan committed Jul 2, 2019
    Configuration menu
    Copy the full SHA
    faf07cf View commit details
    Browse the repository at this point in the history