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

Method testAssertNoLogsDefault

Lib/test/test_unittest/test_case.py:1939–1947  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1937 self.assertLogRecords(cm.records, [{'name': 'foo'}])
1938
1939 def testAssertNoLogsDefault(self):
1940 with self.assertRaises(self.failureException) as cm:
1941 with self.assertNoLogs():
1942 log_foo.info("1")
1943 log_foobar.debug("2")
1944 self.assertEqual(
1945 str(cm.exception),
1946 "Unexpected logs found: ['INFO:foo:1']",
1947 )
1948
1949 def testAssertNoLogsFailureFoundLogs(self):
1950 with self.assertRaises(self.failureException) as cm:

Callers

nothing calls this directly

Calls 6

strFunction · 0.85
assertNoLogsMethod · 0.80
assertRaisesMethod · 0.45
infoMethod · 0.45
debugMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected