mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
use with_traceback correctly
This commit is contained in:
parent
060cee221b
commit
589c2d39c7
1 changed files with 1 additions and 2 deletions
|
@ -117,8 +117,7 @@ class _AssertRaisesContext(object):
|
|||
# let unexpected exceptions pass through
|
||||
return False
|
||||
#store exception, without traceback, for later retrieval
|
||||
self.exc_value = exc_value
|
||||
self.exc_value.with_traceback(None)
|
||||
self.exc_value = exc_value.with_traceback(None)
|
||||
if self.expected_regex is None:
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue