1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #32552 -- Added DiscoverRunner.log() to allow customization.

Thanks Carlton Gibson, Chris Jerdonek, and David Smith for reviews.
This commit is contained in:
Daniyal
2021-03-19 14:50:08 +05:30
committed by Mariusz Felisiak
parent cd19db10df
commit a0410ffe8f
4 changed files with 82 additions and 11 deletions

View File

@@ -705,6 +705,17 @@ Methods
Computes and returns a return code based on a test suite, and the result
from that test suite.
.. method:: DiscoverRunner.log(msg, level=None)
.. versionadded:: 4.0
Prints to the console a message with the given integer `logging level`_
(e.g. ``logging.DEBUG``, ``logging.INFO``, or ``logging.WARNING``),
respecting the current ``verbosity``. For example, an ``INFO`` message will
be logged if the ``verbosity`` is at least 1, and ``DEBUG`` will be logged
if it is at least 2.
.. _`logging level`: https://docs.python.org/3/library/logging.html#levels
Testing utilities
-----------------