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

Method test_bug828737

Lib/test/test_codeccallbacks.py:1116–1126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1114 self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
1115
1116 def test_bug828737(self):
1117 charmap = {
1118 ord("&"): "&",
1119 ord("<"): "&lt;",
1120 ord(">"): "&gt;",
1121 ord('"'): "&quot;",
1122 }
1123
1124 for n in (1, 10, 100, 1000):
1125 text = 'abc<def>ghi'*n
1126 text.translate(charmap)
1127
1128 def test_mutating_decode_handler(self):
1129 baddata = [

Callers

nothing calls this directly

Calls 1

translateMethod · 0.45

Tested by

no test coverage detected