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

Method test_partial

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

Source from the content-addressed store, hash-verified

1084 BOM = codecs.BOM_UTF8
1085
1086 def test_partial(self):
1087 self.check_partial(
1088 "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
1089 [
1090 "",
1091 "",
1092 "", # First BOM has been read and skipped
1093 "",
1094 "",
1095 "\ufeff", # Second BOM has been read and emitted
1096 "\ufeff\x00", # "\x00" read and emitted
1097 "\ufeff\x00", # First byte of encoded "\xff" read
1098 "\ufeff\x00\xff", # Second byte of encoded "\xff" read
1099 "\ufeff\x00\xff", # First byte of encoded "\u07ff" read
1100 "\ufeff\x00\xff\u07ff", # Second byte of encoded "\u07ff" read
1101 "\ufeff\x00\xff\u07ff",
1102 "\ufeff\x00\xff\u07ff",
1103 "\ufeff\x00\xff\u07ff\u0800",
1104 "\ufeff\x00\xff\u07ff\u0800",
1105 "\ufeff\x00\xff\u07ff\u0800",
1106 "\ufeff\x00\xff\u07ff\u0800\uffff",
1107 "\ufeff\x00\xff\u07ff\u0800\uffff",
1108 "\ufeff\x00\xff\u07ff\u0800\uffff",
1109 "\ufeff\x00\xff\u07ff\u0800\uffff",
1110 "\ufeff\x00\xff\u07ff\u0800\uffff\U00010000",
1111 ]
1112 )
1113
1114 def test_bug1601501(self):
1115 # SF bug #1601501: check that the codec works with a buffer

Callers

nothing calls this directly

Calls 1

check_partialMethod · 0.80

Tested by

no test coverage detected