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

Method test_find_caller_with_stack_info

Lib/test/test_logging.py:6140–6148  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6138 self.logger.log('10', 'test message') # no exception happens
6139
6140 def test_find_caller_with_stack_info(self):
6141 called = []
6142 support.patch(self, logging.traceback, 'print_stack',
6143 lambda f, file: called.append(file.getvalue()))
6144
6145 self.logger.findCaller(stack_info=True)
6146
6147 self.assertEqual(len(called), 1)
6148 self.assertEqual('Stack (most recent call last):\n', called[0])
6149
6150 def test_find_caller_with_stacklevel(self):
6151 the_level = 1

Callers

nothing calls this directly

Calls 4

findCallerMethod · 0.80
appendMethod · 0.45
getvalueMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected