summaryrefslogtreecommitdiff
path: root/docs/topics/testing
diff options
context:
space:
mode:
authorDaniyal <abbasi.daniyal98@gmail.com>2021-03-19 14:50:08 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-06-01 13:31:44 +0200
commita0410ffe8f43d8dcfbaa261e068879698fafdca3 (patch)
tree61365ebcb837198310827c7129af9cea9257a636 /docs/topics/testing
parentcd19db10df6225e01b77685397a88c9cdf216dd1 (diff)
Refs #32552 -- Added DiscoverRunner.log() to allow customization.
Thanks Carlton Gibson, Chris Jerdonek, and David Smith for reviews.
Diffstat (limited to 'docs/topics/testing')
-rw-r--r--docs/topics/testing/advanced.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt
index d3903757f6..a8a63e7b57 100644
--- a/docs/topics/testing/advanced.txt
+++ b/docs/topics/testing/advanced.txt
@@ -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
-----------------