test_ok2/changelog/10660.bugfix.rst

3 lines
193 B
ReStructuredText

Fix :py:func:`pytest.raises` to return a 'ContextManager' so that type-checkers could narrow
:code:`pytest.raises(...) if ... else nullcontext()` down to 'ContextManager' rather than 'object'.