mirror of
https://github.com/python/cpython.git
synced 2025-11-02 22:51:25 +00:00
assertRaises as context manager now allows you to access exception as documented
This commit is contained in:
parent
a4f46e1292
commit
2bd52dcccb
2 changed files with 8 additions and 3 deletions
|
|
@ -91,7 +91,7 @@ def __init__(self, expected, test_case, expected_regexp=None):
|
|||
self.expected_regexp = expected_regexp
|
||||
|
||||
def __enter__(self):
|
||||
pass
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, tb):
|
||||
if exc_type is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue