Skip to content

Commit 6009858

Browse files
committed
Adds docs and corrects docstring
1 parent d96dca3 commit 6009858

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ typing
274274
(Contributed by Bénédikt Tran in :gh:`133823`.)
275275

276276

277+
unittest
278+
--------
279+
* Expose log formatter to users in TestCase.assertLogs.
280+
:func:`unittest.TestCase.assertLogs` will now accept a formatter
281+
argument so your assertions can match a custom format where you are using one.
282+
(Contributed by Garry Cairns in :gh:`134567`.)
283+
284+
277285
wave
278286
----
279287

Lib/unittest/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ def assertLogs(self, logger=None, level=None, formatter=None):
861861
`records` attribute will be a list of the corresponding LogRecord
862862
objects.
863863
864-
Optionally supply `format` to control how messages are formatted.
864+
Optionally supply `formatter` to control how messages are formatted.
865865
866866
Example::
867867

0 commit comments

Comments
 (0)