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

Method test_bytes

Lib/test/test_gdb/test_pretty_print.py:100–112  ·  view source on GitHub ↗

Verify the pretty-printing of bytes

(self)

Source from the content-addressed store, hash-verified

98
99 @support.requires_resource('cpu')
100 def test_bytes(self):
101 'Verify the pretty-printing of bytes'
102 self.assertGdbRepr(b'')
103 self.assertGdbRepr(b'And now for something hopefully the same')
104 self.assertGdbRepr(b'string with embedded NUL here \0 and then some more text')
105 self.assertGdbRepr(b'this is a tab:\t'
106 b' this is a slash-N:\n'
107 b' this is a slash-R:\r'
108 )
109
110 self.assertGdbRepr(b'this is byte 255:\xff and byte 128:\x80')
111
112 self.assertGdbRepr(bytes([b for b in range(255)]))
113
114 @support.requires_resource('cpu')
115 def test_strings(self):

Callers

nothing calls this directly

Calls 1

assertGdbReprMethod · 0.95

Tested by

no test coverage detected