summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_codeccallbacks.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24102: Fixed exception type checking in standard error handlers.Serhiy Storchaka2015-05-181-0/+20
|
* Use non-zero and non-last positions in error handler tests.Serhiy Storchaka2015-03-161-16/+24
|
* Increased coverage of standard codec error handlers.Serhiy Storchaka2015-03-151-30/+42
|
* Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests areSerhiy Storchaka2013-10-311-2/+2
| | | | loaded from .py[co] files.
* Issue #15866: The xmlcharrefreplace error handler no more produces two XMLSerhiy Storchaka2013-08-061-3/+22
| | | | entities for a non-BMP character on narrow build.
* Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.Serhiy Storchaka2013-01-291-2/+2
|
* Issue #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-11-171-1/+1
| | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-31/+31
| | | | | | | | | | 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. ........
* Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.Ezio Melotti2010-06-051-10/+12
| | | | | | | | | | | | | | | 1) #8271: when a byte sequence is invalid, only the start byte and all the valid continuation bytes are now replaced by U+FFFD, instead of replacing the number of bytes specified by the start byte. See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes in behavior); 3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in RFC 3629, but leave it commented out since it's not backward compatible; 4) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 5) Add an extensive set of tests in test_unicode; 6) Fix test_codeccallbacks because it was failing after this change.
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-1/+1
|
* fix test that wasn't working as expected #4990Benjamin Peterson2009-01-181-1/+1
|
* revert creation of the html.entities and html.parser modulesFred Drake2008-05-201-2/+2
| | | | (http://bugs.python.org/issue2882)
* update references and documentation for modules in the new html packageFred Drake2008-05-171-2/+2
| | | | (http://bugs.python.org/issue2882)
* Backport r57105 and r57145 from the py3k branch: UTF-32 codecs.Walter Dörwald2007-08-171-2/+4
|
* Conversion of exceptions over from faked-up classes to new-style C types.Richard Jones2006-05-271-73/+0
|
* Add tests to increase code coverage in Python/codecs.c and Python/exceptions.c.Walter Dörwald2005-11-171-2/+131
|
* Add tests for various error cases and for readbuffer_encode() andWalter Dörwald2005-11-171-0/+5
| | | | | charbuffer_encode(). This increases code coverage in Modules/_codecsmodule.c from 83% to 95%.
* SF bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complainWalter Dörwald2005-08-301-2/+32
| | | | | about illegal code points. The codec now supports PEP 293 style error handlers. (This is a variant of the Nik Haldimann's patch that detects truncated data)
* Fix copy & paste error in comments.Walter Dörwald2004-12-141-2/+2
|
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().Walter Dörwald2003-10-241-0/+12
| | | | | | | charmaptranslate_makespace() allocated more memory than required for the next replacement but didn't remember that fact, so memory size was growing exponentially every time a replacement string is longer that one character. This fixes SF bug #828737.
* Add a unicode prefix to the characters in the UnicodeEncodeError andWalter Dörwald2003-08-121-9/+9
| | | | UnicodeTranslateError message.
* Enhance message for UnicodeEncodeError and UnicodeTranslateError.Walter Dörwald2003-08-121-3/+35
| | | | | If there is only one bad character it will now be printed in a form that is a valid Python string.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-3/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Use the new htmlentitydefs.codepoint2name for test_xmlcharnamereplace()Walter Dörwald2003-04-291-7/+1
|
* Whitespace normalization.Tim Peters2003-02-191-2/+2
|
* Change the treatment of positions returned by PEP293Walter Dörwald2003-01-311-22/+74
| | | | | | | | | | | | | | | | error handers in the Unicode codecs: Negative positions are treated as being relative to the end of the input and out of bounds positions result in an IndexError. Also update the PEP and include an explanation of this in the documentation for codecs.register_error. Fixes a small bug in iconv_codecs: if the position from the callback is negative *add* it to the size instead of substracting it. From SF patch #677429.
* Add comments and remove duplicate tests.Walter Dörwald2003-01-201-26/+34
|
* Make the test scripts work again with narrow Python builds.Walter Dörwald2003-01-091-1/+1
|
* Add a few test cases to increase code coverage:Walter Dörwald2003-01-081-0/+115
| | | | | | | | | | | | | | | From: 69.73% of 294 source lines executed in file ./Modules/_codecsmodule.c 79.47% of 487 source lines executed in file Python/codecs.c 78.45% of 3643 source lines executed in file Objects/unicodeobject.c To: 70.41% of 294 source lines executed in file ./Modules/_codecsmodule.c 82.75% of 487 source lines executed in file Python/codecs.c 80.76% of 3638 source lines executed in file Objects/unicodeobject.c This actually unearthed a bug in the handling of None values in PyUnicode_EncodeCharmap.
* Fix typo in comment.Walter Dörwald2002-11-251-1/+1
|
* Update character names.Martin v. Löwis2002-11-231-3/+3
|
* Whitespace normalization.Tim Peters2002-11-091-5/+5
|
* Add a test case that checks that the proper exception is raisesWalter Dörwald2002-09-061-0/+15
| | | | | when the replacement from an encoding error callback is itself unencodable.
* PEP 293 implemention (from SF patch http://www.python.org/sf/432401)Walter Dörwald2002-09-021-0/+483