mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
unittest.TestCase.assertRaises(): BaseException (#2594)
In Python 3, just as in Python 2, the expected exception argument to assertRaises() and assertRaisesRegex() must be a subtype of BaseException, not just of Exception. Closes #2593
This commit is contained in:
committed by
Jelle Zijlstra
parent
e58a338d51
commit
f8e5222c46
@@ -12,7 +12,7 @@ from types import ModuleType, TracebackType
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_FT = TypeVar('_FT', bound=Callable[..., Any])
|
||||
_E = TypeVar('_E', bound=Exception)
|
||||
_E = TypeVar('_E', bound=BaseException)
|
||||
|
||||
|
||||
def expectedFailure(func: _FT) -> _FT: ...
|
||||
|
||||
Reference in New Issue
Block a user