ยปCore Development>Code coverage>Lib/encodings/utf_16_le.py

Python code coverage for Lib/encodings/utf_16_le.py

#countcontent
1n/a""" Python 'utf-16-le' Codec
2n/a
3n/a
4n/aWritten by Marc-Andre Lemburg (mal@lemburg.com).
5n/a
6n/a(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
7n/a
8n/a"""
9n/aimport codecs
10n/a
11n/a### Codec APIs
12n/a
13n/aencode = codecs.utf_16_le_encode
14n/a
15n/adef decode(input, errors='strict'):
16n/a return codecs.utf_16_le_decode(input, errors, True)
17n/a
18n/aclass IncrementalEncoder(codecs.IncrementalEncoder):
19n/a def encode(self, input, final=False):
20n/a return codecs.utf_16_le_encode(input, self.errors)[0]
21n/a
22n/aclass IncrementalDecoder(codecs.BufferedIncrementalDecoder):
23n/a _buffer_decode = codecs.utf_16_le_decode
24n/a
25n/aclass StreamWriter(codecs.StreamWriter):
26n/a encode = codecs.utf_16_le_encode
27n/a
28n/aclass StreamReader(codecs.StreamReader):
29n/a decode = codecs.utf_16_le_decode
30n/a
31n/a### encodings module API
32n/a
33n/adef getregentry():
34n/a return codecs.CodecInfo(
35n/a name='utf-16-le',
36n/a encode=encode,
37n/a decode=decode,
38n/a incrementalencoder=IncrementalEncoder,
39n/a incrementaldecoder=IncrementalDecoder,
40n/a streamreader=StreamReader,
41n/a streamwriter=StreamWriter,
42n/a )