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

Python code coverage for Lib/encodings/utf_7.py

#countcontent
1n/a""" Python 'utf-7' Codec
2n/a
3n/aWritten by Brian Quinlan (brian@sweetapp.com).
4n/a"""
5n/aimport codecs
6n/a
7n/a### Codec APIs
8n/a
9n/aencode = codecs.utf_7_encode
10n/a
11n/adef decode(input, errors='strict'):
12n/a return codecs.utf_7_decode(input, errors, True)
13n/a
14n/aclass IncrementalEncoder(codecs.IncrementalEncoder):
15n/a def encode(self, input, final=False):
16n/a return codecs.utf_7_encode(input, self.errors)[0]
17n/a
18n/aclass IncrementalDecoder(codecs.BufferedIncrementalDecoder):
19n/a _buffer_decode = codecs.utf_7_decode
20n/a
21n/aclass StreamWriter(codecs.StreamWriter):
22n/a encode = codecs.utf_7_encode
23n/a
24n/aclass StreamReader(codecs.StreamReader):
25n/a decode = codecs.utf_7_decode
26n/a
27n/a### encodings module API
28n/a
29n/adef getregentry():
30n/a return codecs.CodecInfo(
31n/a name='utf-7',
32n/a encode=encode,
33n/a decode=decode,
34n/a incrementalencoder=IncrementalEncoder,
35n/a incrementaldecoder=IncrementalDecoder,
36n/a streamreader=StreamReader,
37n/a streamwriter=StreamWriter,
38n/a )