diff options
author | Jelmer Vernooij <jelmer@jelmer.uk> | 2022-01-24 19:50:58 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@jelmer.uk> | 2022-01-24 19:59:38 +0000 |
commit | 8d207b725e1a23c71e4e7306336441fa894e2c21 (patch) | |
tree | ef06c4c2087d24e23ed92d45e6e402dcca1420c0 | |
parent | 36870c84ca9a92f6b70da323ab931568cc2dcff0 (diff) | |
download | testtools-8d207b725e1a23c71e4e7306336441fa894e2c21.tar.gz |
Fix docstring formatting warnings.
-rw-r--r-- | testtools/matchers/_warnings.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/testtools/matchers/_warnings.py b/testtools/matchers/_warnings.py index 3002283..0b808d4 100644 --- a/testtools/matchers/_warnings.py +++ b/testtools/matchers/_warnings.py @@ -22,7 +22,7 @@ from ._impl import Mismatch def WarningMessage(category_type, message=None, filename=None, lineno=None, line=None): r""" - Create a matcher that will match `warnings.WarningMessage`s. + Create a matcher that will match `warnings.WarningMessage`\s. For example, to match captured `DeprecationWarning`s with a message about some ``foo`` being replaced with ``bar``: @@ -34,16 +34,15 @@ def WarningMessage(category_type, message=None, filename=None, lineno=None, Contains('foo is deprecated'), Contains('use bar instead'))) - :param type category_type: A warning type, for example - `DeprecationWarning`. + :param type category_type: A warning type, for example `DeprecationWarning`. :param message_matcher: A matcher object that will be evaluated against - warning's message. + warning's message. :param filename_matcher: A matcher object that will be evaluated against - the warning's filename. + the warning's filename. :param lineno_matcher: A matcher object that will be evaluated against the - warning's line number. + warning's line number. :param line_matcher: A matcher object that will be evaluated against the - warning's line of source code. + warning's line of source code. """ category_matcher = Is(category_type) message_matcher = message or Always() |