Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 778cba7

Browse files
committed
Issue #18573: More copy-paste fixes to assertWarns entry.
1 parent cdc75d9 commit 778cba7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/unittest.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,12 +897,12 @@ Test cases
897897
Test that a warning is triggered when *callable* is called with any
898898
positional or keyword arguments that are also passed to
899899
:meth:`assertWarns`. The test passes if *warning* is triggered and
900-
fails if it isn't. Also, any unexpected exception is an error.
900+
fails if it isn't. Any exception is an error.
901901
To catch any of a group of warnings, a tuple containing the warning
902902
classes may be passed as *warnings*.
903903

904904
If only the *warning* and possibly the *msg* arguments are given,
905-
returns a context manager so that the code under test can be written
905+
return a context manager so that the code under test can be written
906906
inline rather than as a function::
907907

908908
with self.assertWarns(SomeWarning):
@@ -915,7 +915,7 @@ Test cases
915915
:attr:`warning` attribute, and the source line which triggered the
916916
warnings in the :attr:`filename` and :attr:`lineno` attributes.
917917
This can be useful if the intention is to perform additional checks
918-
on the exception raised::
918+
on the warning caught::
919919

920920
with self.assertWarns(SomeWarning) as cm:
921921
do_something()

0 commit comments

Comments
 (0)