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

Method check

Lib/test/test_codeccallbacks.py:1179–1182  ·  view source on GitHub ↗
(input, expected, msg)

Source from the content-addressed store, hash-verified

1177 br'\x5': (b'x\\', 1),
1178 }
1179 def check(input, expected, msg):
1180 with self.assertWarns(DeprecationWarning) as cm:
1181 self.assertEqual(decode(input, 'test.mutating2'), (expected, len(input)))
1182 self.assertIn(msg, str(cm.warning))
1183
1184 check(br'\x0n\z', '\u0404\n\\z', r'"\z" is an invalid escape sequence')
1185 check(br'\x0n\501', '\u0404\n\u0141', r'"\501" is an invalid octal escape sequence')

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
assertWarnsMethod · 0.80
assertInMethod · 0.80
decodeFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected