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

Method get_state

Lib/test/test_bdb.py:337–353  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

335 else lineno)
336
337 def get_state(self):
338 lineno = self.lno_abs2rel()
339 co_name = self.frame.f_code.co_name
340 state = "('%s', %d, '%s'" % (self.event, lineno, co_name)
341 if self.breakpoint_hits:
342 bps = '{'
343 for n in self.breakpoint_hits[0]:
344 if bps != '{':
345 bps += ', '
346 bps += '%s: %s' % (n, self.get_bpbynumber(n).hits)
347 bps += '}'
348 bps = '(' + bps + ', ' + str(self.breakpoint_hits[1]) + ')'
349 state += ', ' + bps
350 elif self.event == 'exception':
351 state += ', ' + self.exc_info[0].__name__
352 state += '), '
353 return state.ljust(32) + str(self.set_tuple) + ','
354
355 def print_state(self, header=None):
356 if header is not None and self.expect_set_no == 1:

Callers 3

print_stateMethod · 0.95
raise_not_expectedMethod · 0.95

Calls 4

lno_abs2relMethod · 0.95
strFunction · 0.85
get_bpbynumberMethod · 0.80
ljustMethod · 0.45

Tested by

no test coverage detected