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

Derive pytest.raises from AbstractContextManager #10660

Merged
merged 1 commit into from Jan 18, 2023

Commits on Jan 13, 2023

  1. Derive pytest.raises from AbstractContextManager

    Makes `AbstractContextManager` the shared base class between "raises" and other context managers.
    
    The motivation is for type checkers to narrow `pytest.raises(...) if x else nullcontext()` to a `ContextManager` rather than `object`.
    ikonst committed Jan 13, 2023
    Copy the full SHA
    1a96f16 View commit details
    Browse the repository at this point in the history