diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:14:22 +0200 |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 21:14:22 +0200 |
commit | 737fb89dd15e4db6ef30d25963e774ae09cc49dc (patch) | |
tree | 422450a087195dbb9e33c7d73d96fd2f1a5f1fcd /Lib/unittest/case.py | |
parent | 4001e96179543cf056613e65dcedc63716c6bc21 (diff) | |
download | cpython-git-737fb89dd15e4db6ef30d25963e774ae09cc49dc.tar.gz |
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
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 bd47493ebd..bea810711d 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -528,10 +528,10 @@ class TestCase(object): def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. |