summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-13 22:09:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-13 22:09:10 (GMT)
commit589c2d39c70b5695ed3447769939cc4e6cc660a8 (patch)
treed1f176adad78ceaeec0fbc46a2f6d917c9c0d73c /Lib/unittest
parent060cee221b7d24479da93d925607defb2b6e3dd9 (diff)
downloadcpython-589c2d39c70b5695ed3447769939cc4e6cc660a8.zip
cpython-589c2d39c70b5695ed3447769939cc4e6cc660a8.tar.gz
cpython-589c2d39c70b5695ed3447769939cc4e6cc660a8.tar.bz2
use with_traceback correctly
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/case.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index ed17b6e..4f9c496 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -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