MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_partial

Method test_partial

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

Source from the content-addressed store, hash-verified

490 self.assertRaises(UnicodeDecodeError, f.read)
491
492 def test_partial(self):
493 self.check_partial(
494 "\x00\xff\u0100\uffff\U00010000",
495 [
496 "", # first byte of BOM read
497 "", # second byte of BOM read
498 "", # third byte of BOM read
499 "", # fourth byte of BOM read => byteorder known
500 "",
501 "",
502 "",
503 "\x00",
504 "\x00",
505 "\x00",
506 "\x00",
507 "\x00\xff",
508 "\x00\xff",
509 "\x00\xff",
510 "\x00\xff",
511 "\x00\xff\u0100",
512 "\x00\xff\u0100",
513 "\x00\xff\u0100",
514 "\x00\xff\u0100",
515 "\x00\xff\u0100\uffff",
516 "\x00\xff\u0100\uffff",
517 "\x00\xff\u0100\uffff",
518 "\x00\xff\u0100\uffff",
519 "\x00\xff\u0100\uffff\U00010000",
520 ]
521 )
522
523 def test_handlers(self):
524 self.assertEqual(('\ufffd', 1),

Callers

nothing calls this directly

Calls 1

check_partialMethod · 0.80

Tested by

no test coverage detected