diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-07 18:44:12 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-07 18:44:12 (GMT) |
commit | 2bd52dcccbd38908ae2a3b3bdceb3b04d6b16c81 (patch) | |
tree | 089ff2404ebb4b86054f3dda2b0396b9c99f8038 /Lib/unittest | |
parent | a4f46e129294c686ef1effdd89c459bd9a624e6d (diff) | |
download | cpython-2bd52dcccbd38908ae2a3b3bdceb3b04d6b16c81.zip cpython-2bd52dcccbd38908ae2a3b3bdceb3b04d6b16c81.tar.gz cpython-2bd52dcccbd38908ae2a3b3bdceb3b04d6b16c81.tar.bz2 |
assertRaises as context manager now allows you to access exception as documented
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/case.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index 63408e3..4acfa65 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -91,7 +91,7 @@ class _AssertRaisesContext(object): self.expected_regexp = expected_regexp def __enter__(self): - pass + return self def __exit__(self, exc_type, exc_value, tb): if exc_type is None: |