summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codecs.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) ↵Miss Islington (bot)2017-11-291-2/+16
| | | | | | | (#4623) characters/bytes for non-negative n. This makes it compatible with read() methods of other file-like objects. (cherry picked from commit 219c2de5ad0fdac825298bed1bb251f16956c04a)
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|
* Issue #24848: Fixed yet one bug in UTF-7 decoder. Testing for BASE64 characterSerhiy Storchaka2015-10-101-8/+8
| | | | was locale depending.
* Make error report in test_codecs more informative.Serhiy Storchaka2015-10-041-10/+26
|
* Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:Serhiy Storchaka2015-10-021-0/+59
| | | | | 1. Non-ASCII bytes were accepted after shift sequence. 2. A low surrogate could be emitted in case of error in high surrogate.
* Issue #16473: Fix byte transform codec documentation; test quotetabs=TrueMartin Panter2015-09-121-0/+8
| | | | | | This changes the equivalent functions listed for the Base-64, hex and Quoted- Printable codecs to reflect the functions actually used. Also mention and test the "quotetabs" setting for Quoted-Printable encoding.
* Remove and enable misplaced codecs tests ported from Python 3Martin Panter2015-09-121-45/+8
| | | | | | Most of these tests are about blacklisted non-text codecs, which are not relevant in Python 2. The only one remaining is TransformCodecTest.test_uu_ invalid().
* Issue #19543: Emit deprecation warning for known non-text encodings.Serhiy Storchaka2015-05-311-2/+46
| | | | | | | | | | Backported issues #19619: encode() and decode() methods and constructors of str, unicode and bytearray classes now emit deprecation warning for known non-text encodings when Python is ran with the -3 option. Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the internal codec marking system added to emit deprecation warning for known non-text encodings at stream construction time when Python is ran with the -3 option.
* Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter.Serhiy Storchaka2014-12-201-0/+22
|
* Backported tests for issue #22406.Serhiy Storchaka2014-11-071-0/+4
|
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-31/+55
|
* Issue #20520: Fixed readline test in test_codecs.Serhiy Storchaka2014-02-061-6/+15
|
* Issue #8260: The read(), readline() and readlines() methods ofSerhiy Storchaka2014-01-261-0/+34
| | | | | codecs.StreamReader returned incomplete data when were called after readline() or read(size). Based on patch by Amaury Forgeot d'Arc.
* Issue #19279: UTF-7 decoder no more produces illegal unicode strings.Serhiy Storchaka2013-10-191-0/+29
|
* Add tests for raw-unicode-escape codec.Serhiy Storchaka2013-01-291-0/+51
|
* Clean up escape-decode decoder tests.Serhiy Storchaka2013-01-291-36/+40
|
* Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-0/+84
|
* Issue #16975: Fix error handling bug in the escape-decode decoder.Serhiy Storchaka2013-01-251-0/+44
|
* Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-5/+51
| | | | in any mapping, not only in an unicode string.
* Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-8/+40
| | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
* Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-11-171-0/+105
| | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* Issue #14579: Fix error handling bug in the utf-16 decoder.Antoine Pitrou2012-07-201-2/+26
| | | | Patch by Serhiy Storchaka.
* Issue #1813: Fix codec lookup and setting/getting locales under Turkish locales.Antoine Pitrou2011-07-241-0/+14
|
* test_codecs now removes the temporay file (created by the test)Victor Stinner2011-05-231-7/+6
|
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-69/+69
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crashAntoine Pitrou2010-06-111-0/+25
| | | | | the interpreter with characters outside the Basic Multilingual Plane (higher than 0x10000).
* #8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the ↵Georg Brandl2010-05-241-0/+2
| | | | tests, it was missing there.)
* Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32Victor Stinner2010-05-221-3/+39
| | | | | | | * Fix seek() method of codecs.open(), don't write the BOM twice after seek(0) * Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes * test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by Solaris or Windows, but does it really exist? I found it the in the issue.
* Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twiceVictor Stinner2010-05-221-0/+21
| | | | after seek(0)
* fix escape_encode to return the correct consumed sizePhilip Jenvey2010-04-051-0/+3
|
* #691291: codecs.open() should not convert end of lines on reading and writing.Florent Xicluna2010-02-261-0/+15
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-2/+2
|
* Issue #6922: Fix an infinite loop when trying to decode an invalidGeorg Brandl2009-09-171-0/+12
| | | | UTF-32 stream with a non-raising error handler like "replace" or "ignore".
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-4/+4
|
* Issue 3739: The unicode-internal encoder now reports the number of *characters*Walter Dörwald2009-05-061-2/+7
| | | | consumed like any other encoder (instead of the number of bytes).
* The incremental decoder for utf-7 must preserve its state between calls.Amaury Forgeot d'Arc2007-11-201-2/+12
| | | | | | | Solves issue1460. Might not be a backport candidate: a new API function was added, and some code may rely on details in utf-7.py.
* Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())Walter Dörwald2007-11-191-0/+44
| | | | | calling codecs.utf_8_decode() with final==True, which falled with incomplete byte sequences. Fix and test by James G. Sack.
* Fix typo in comment.Walter Dörwald2007-11-191-1/+1
|
* Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.Walter Dörwald2007-08-171-0/+134
|
* Fix utf-8-sig incremental decoder, which didn't recognise a BOM when theWalter Dörwald2007-04-121-0/+5
| | | | first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
* Change decode() so that it works with a buffer (i.e. unicode(..., 'utf-8-sig'))Walter Dörwald2006-11-231-0/+4
| | | | SF bug #1601501.
* Whitespace normalization.Tim Peters2006-11-031-2/+2
|
* I'm assuming this is correct, it fixes the tests so they pass againNeal Norwitz2006-10-291-0/+1
|
* Add tests for incremental codecs with an errorsWalter Dörwald2006-10-291-0/+24
| | | | argument.
* Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders.Georg Brandl2006-10-291-0/+2
|
* Fix the new EncodedFile test to work with big endian platforms.Georg Brandl2006-10-291-2/+2
|
* Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, andGeorg Brandl2006-10-291-1/+28
| | | | | fix all codecs file wrappers to work correctly with the "with" statement (bug #1586513).
* Verify the crash due to EncodingMap not initialized does not returnNeal Norwitz2006-06-131-0/+6
|
* Add a BufferedIncrementalEncoder class that can be used for implementingWalter Dörwald2006-04-141-3/+70
| | | | | | | | | an incremental encoder that must retain part of the data between calls to the encode() method. Fix the incremental encoder and decoder for the IDNA encoding. This closes SF patch #1453235.
* Call encode()/decode() with final==True as the last call in theWalter Dörwald2006-04-141-0/+4
| | | | incremental codec tests.