MCPcopy Create free account
hub / github.com/python/cpython / check_repr

Method check_repr

Lib/test/test_gdb/test_pretty_print.py:133–139  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

131 f'stderr={stderr!r}')
132
133 def check_repr(text):
134 try:
135 text.encode(encoding)
136 except UnicodeEncodeError:
137 self.assertGdbRepr(text, ascii(text))
138 else:
139 self.assertGdbRepr(text)
140
141 self.assertGdbRepr('')
142 self.assertGdbRepr('And now for something hopefully the same')

Callers

nothing calls this directly

Calls 3

assertGdbReprMethod · 0.95
asciiFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected