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

Method assertLogRecords

Lib/test/test_unittest/test_case.py:1823–1828  ·  view source on GitHub ↗
(self, records, matches)

Source from the content-addressed store, hash-verified

1821 self.assertEqual(buf.getvalue(), "")
1822
1823 def assertLogRecords(self, records, matches):
1824 self.assertEqual(len(records), len(matches))
1825 for rec, match in zip(records, matches):
1826 self.assertIsInstance(rec, logging.LogRecord)
1827 for k, v in match.items():
1828 self.assertEqual(getattr(rec, k), v)
1829
1830 def testAssertLogsDefaults(self):
1831 # defaults: root logger, level INFO

Calls 3

assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected