diff options
Diffstat (limited to 'Lib/unittest/case.py')
| -rw-r--r-- | Lib/unittest/case.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index 854ebc4..63408e3 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -104,7 +104,7 @@ class _AssertRaisesContext(object): if not issubclass(exc_type, self.expected): # let unexpected exceptions pass through return False - self.exc_value = exc_value #store for later retrieval + self.exception = exc_value # store for later retrieval if self.expected_regexp is None: return True @@ -389,7 +389,7 @@ class TestCase(object): with self.assertRaises(SomeException) as cm: do_something() - the_exception = cm.exc_value + the_exception = cm.exception self.assertEqual(the_exception.error_code, 3) """ context = _AssertRaisesContext(excClass, self) |
