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

Method test_cp1252

Lib/test/test_codecs.py:3392–3408  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3390 ))
3391
3392 def test_cp1252(self):
3393 self.check_encode(1252, (
3394 ('abc', 'strict', b'abc'),
3395 ('\xe9\u20ac', 'strict', b'\xe9\x80'),
3396 ('\xff', 'strict', b'\xff'),
3397 # test error handlers
3398 ('\u0141', 'strict', None),
3399 ('\u0141', 'ignore', b''),
3400 ('\u0141', 'replace', b'L', b'?'),
3401 ('\udc98', 'surrogateescape', b'\x98'),
3402 ('\udc98', 'surrogatepass', None),
3403 ))
3404 self.check_decode(1252, (
3405 (b'abc', 'strict', 'abc'),
3406 (b'\xe9\x80', 'strict', '\xe9\u20ac'),
3407 (b'\xff', 'strict', '\xff'),
3408 ))
3409
3410 def test_cp708(self):
3411 self.check_encode(708, (

Callers

nothing calls this directly

Calls 2

check_encodeMethod · 0.95
check_decodeMethod · 0.95

Tested by

no test coverage detected