MCPcopy Index your code
hub / github.com/python/cpython / assertNoLogs

Method assertNoLogs

Lib/unittest/case.py:878–885  ·  view source on GitHub ↗

Fail unless no log messages of level *level* or higher are emitted on *logger_name* or its children. This method must be used as a context manager.

(self, logger=None, level=None)

Source from the content-addressed store, hash-verified

876 return _AssertLogsContext(self, logger, level, no_logs=False, formatter=formatter)
877
878 def assertNoLogs(self, logger=None, level=None):
879 """ Fail unless no log messages of level *level* or higher are emitted
880 on *logger_name* or its children.
881
882 This method must be used as a context manager.
883 """
884 from ._log import _AssertLogsContext
885 return _AssertLogsContext(self, logger, level, no_logs=True)
886
887 def _getAssertEqualityFunc(self, first, second):
888 """Get a detailed comparison function for the types of the two args.

Calls 1

_AssertLogsContextClass · 0.85