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

Method assertGdbRepr

Lib/test/test_gdb/test_pretty_print.py:55–63  ·  view source on GitHub ↗
(self, val, exp_repr=None)

Source from the content-addressed store, hash-verified

53 self.assertTrue(BREAKPOINT_FN in gdb_output)
54
55 def assertGdbRepr(self, val, exp_repr=None):
56 # Ensure that gdb's rendering of the value in a debugged process
57 # matches repr(value) in this process:
58 gdb_repr, gdb_output = self.get_gdb_repr('id(' + ascii(val) + ')')
59 if not exp_repr:
60 exp_repr = repr(val)
61 self.assertEqual(gdb_repr, exp_repr,
62 ('%r did not equal expected %r; full output was:\n%s'
63 % (gdb_repr, exp_repr, gdb_output)))
64
65 @support.requires_resource('cpu')
66 def test_int(self):

Callers 10

test_intMethod · 0.95
test_singletonsMethod · 0.95
test_dictsMethod · 0.95
test_listsMethod · 0.95
test_bytesMethod · 0.95
check_reprMethod · 0.95
test_stringsMethod · 0.95
test_tuplesMethod · 0.95
test_setsMethod · 0.95
test_frozensetsMethod · 0.95

Calls 3

get_gdb_reprMethod · 0.95
asciiFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected