Skip to content

Commit b5ec092

Browse files
authored
Merge pull request #9149 from Vijay-Arora/main
2 parents 8528052 + 5b35518 commit b5ec092

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ Victor Maryama
377377
Victor Rodriguez
378378
Victor Uriarte
379379
Vidar T. Fauske
380+
Vijay Arora
380381
Virgil Dupras
381382
Vitaly Lashmanov
382383
Vivaan Verma

changelog/9146.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve Documentation for `caplog.set_level`.

src/_pytest/logging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ def _force_enable_logging(
515515
return original_disable_level
516516

517517
def set_level(self, level: Union[int, str], logger: Optional[str] = None) -> None:
518-
"""Set the level of a logger for the duration of a test.
518+
"""Set the threshold level of a logger for the duration of a test.
519+
520+
Logging messages which are less severe than this level will not be captured.
519521
520522
.. versionchanged:: 3.4
521523
The levels of the loggers changed by this function will be

0 commit comments

Comments
 (0)