MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_find_caller_with_stack_info

Method test_find_caller_with_stack_info

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

Source from the content-addressed store, hash-verified

5996 self.logger.log('10', 'test message') # no exception happens
5997
5998 def test_find_caller_with_stack_info(self):
5999 called = []
6000 support.patch(self, logging.traceback, 'print_stack',
6001 lambda f, file: called.append(file.getvalue()))
6002
6003 self.logger.findCaller(stack_info=True)
6004
6005 self.assertEqual(len(called), 1)
6006 self.assertEqual('Stack (most recent call last):\n', called[0])
6007
6008 def test_find_caller_with_stacklevel(self):
6009 the_level = 1

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
findCallerMethod · 0.80
appendMethod · 0.45
getvalueMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected