summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix indentation and add a skip decorator.Ezio Melotti2011-08-221-24/+28
|
* #9200: The str.is* methods now work with strings that contain non-BMP ↵Ezio Melotti2011-08-221-1/+157
| | | | characters even in narrow Unicode builds.
* in narrow builds, make sure to test codepoints as identifier characters ↵Benjamin Peterson2011-08-131-0/+1
| | | | | | (closes #12732) This fixes the use of Unicode identifiers outside the BMP in narrow builds.
* Closes #12579. Positional fields with str.format_map() now raise a ↵Eric V. Smith2011-07-181-0/+5
| | | | ValueError instead of SystemError.
* Fix closes issue12471 - wrong TypeError message when '%i' format spec was used.Senthil Kumaran2011-07-041-0/+1
|
* #6780: merge with 3.1.Ezio Melotti2011-04-261-0/+8
|\
| * #6780: fix starts/endswith error message to mention that tuples are accepted ↵Ezio Melotti2011-04-261-0/+11
| | | | | | | | too.
| * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | 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. ........
| * Merged revisions 85861 via svnmerge fromAntoine Pitrou2010-10-271-3/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85861 | antoine.pitrou | 2010-10-27 20:52:48 +0200 (mer., 27 oct. 2010) | 3 lines Recode modules from latin-1 to utf-8 ........
| * Merged revisions 83966 via svnmerge fromEric Smith2010-08-131-5/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83966 | eric.smith | 2010-08-12 17:55:30 -0400 (Thu, 12 Aug 2010) | 1 line Remove unused test class. ........
| * Merged revisions 82978 via svnmerge fromStefan Krah2010-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82978 | stefan.krah | 2010-07-19 19:58:26 +0200 (Mon, 19 Jul 2010) | 3 lines Sub-issue of #9036: Fix incorrect use of Py_CHARMASK. ........
| * Merged revisions 82413,82468 via svnmerge fromEzio Melotti2010-07-031-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82413 | ezio.melotti | 2010-07-01 10:32:02 +0300 (Thu, 01 Jul 2010) | 13 lines Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629. 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) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 4) Add an extensive set of tests in test_unicode; 5) Fix test_codeccallbacks because it was failing after this change. ........ r82468 | ezio.melotti | 2010-07-03 07:52:19 +0300 (Sat, 03 Jul 2010) | 1 line Update comment about surrogates. ........
| * Merged revisions 81823,81835 via svnmerge fromBenjamin Peterson2010-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81823 | benjamin.peterson | 2010-06-07 17:31:26 -0500 (Mon, 07 Jun 2010) | 9 lines Merged revisions 81820 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line correctly overflow when indexes are too large ........ ................ r81835 | benjamin.peterson | 2010-06-08 09:57:22 -0500 (Tue, 08 Jun 2010) | 9 lines Merged revisions 81834 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81834 | benjamin.peterson | 2010-06-08 09:53:29 -0500 (Tue, 08 Jun 2010) | 1 line kill extra word ........ ................
| * Merged revisions 79281 via svnmerge fromVictor Stinner2010-03-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r79281 | victor.stinner | 2010-03-22 13:50:40 +0100 (lun., 22 mars 2010) | 16 lines Merged revisions 79278,79280 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines Issue #1583863: An unicode subclass can now override the __str__ method ........ r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines Fix the NEWS about my last commit: an unicode subclass can now override the __unicode__ method (and not the __str__ method). Simplify also the testcase. ........ ................
| * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-38/+38
| | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | Merged revisions 88697 via svnmerge fromVictor Stinner2011-03-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88697 | victor.stinner | 2011-03-01 23:46:52 +0100 (mar., 01 mars 2011) | 4 lines Issue #11246: Fix PyUnicode_FromFormat("%V") Decode the byte string from UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode). Patch written by Ray Allen. ........
* | Merged revisions 88481 via svnmerge fromVictor Stinner2011-02-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88481 | victor.stinner | 2011-02-21 22:13:44 +0100 (lun., 21 févr. 2011) | 4 lines Fix PyUnicode_FromFormatV("%c") for non-BMP char Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on narrow build. ........
* | Issue #11302: missing type check on _string.formatter_field_name_split and ↵Eric Smith2011-01-291-0/+52
| | | | | | | | | | | | _string.formatter_parser caused crash. Originial patch by haypo, reviewed by me, okayed by Georg.
* | test_unicode: use ctypes to test PyUnicode_FromFormat()Victor Stinner2011-01-051-6/+20
| | | | | | | | | | Instead of _testcapi.format_unicode() because it has a limited API: it requires exactly one argument of type unicode.
* | Issue #10557: Fixed error messages from float() and other numericAlexander Belopolsky2010-12-041-2/+7
| | | | | | | | | | | | types. Added a new API function, PyUnicode_TransformDecimalToASCII(), which transforms non-ASCII decimal digits in a Unicode string to their ASCII equivalents.
* | #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and ↵Ezio Melotti2010-12-011-1/+1
| | | | | | | | assertRaisesRegex.
* | Fix tests when ctypes isn't availableAntoine Pitrou2010-11-221-0/+2
| |
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-18/+18
| |
* | Removed unused test classes from test_format_map().Eric Smith2010-11-061-38/+0
| |
* | Issue #6081: Add str.format_map. str.format_map(mapping) is similar to ↵Eric Smith2010-11-041-0/+78
| | | | | | | | str.format(**mapping), except mapping does not get converted to a dict.
* | Recode modules from latin-1 to utf-8Antoine Pitrou2010-10-271-3/+2
| |
* | PyUnicode_FromFormatV(): Fix %A formatVictor Stinner2010-10-181-3/+6
| | | | | | | | It was not completly implemented. Add a test.
* | Upgrade to Unicode 6.0.0.Martin v. Löwis2010-10-111-1/+1
| | | | | | | | | | | | | | | | makeunicodedata.py: download all data files from unicode.org, switch to extracting Unihan data from zip file. Read linebreakprops and derivednormalizationprops even for old versions, even though they are not used in delta records. test:unicode.py: U+11000 is now assigned, use U+14000 instead.
* | Issue #8670: Rename testcapi unicode test methodsVictor Stinner2010-10-021-11/+11
| | | | | | | | | | * test_aswidechar() => unicode_aswidechar() * test_aswidecharstring() => unicode_aswidecharstring()
* | Oops, revert unwanted _testcapi changes of r85174Victor Stinner2010-10-021-11/+11
| |
* | Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_tVictor Stinner2010-10-021-11/+11
| |
* | Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replaceVictor Stinner2010-10-021-0/+20
| | | | | | | | | | UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE and 32 bits wchar_t (eg. Linux in narrow build).
* | Issue #8870: PyUnicode_AsWideCharString() doesn't count the trailing nul ↵Victor Stinner2010-10-021-0/+39
| | | | | | | | | | | | character And write unit tests for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString().
* | Issue 7994: Make object.__format__() raise a PendingDeprecationWarningEric Smith2010-09-131-4/+7
| | | | | | | | | | | | | | | | | | if the format string is not empty. Manually merge r79596 and r84772 from 2.x. Also, apparently test_format() from test_builtin never made it into 3.x. I've added it as well. It tests the basic format() infrastructure.
* | Reenable test_ucs4 and remove some duplicated lines.Florent Xicluna2010-09-131-26/+17
| |
* | Issue #9738, #9836: Fix refleak introduced by r84704Victor Stinner2010-09-121-1/+1
| |
* | Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error onVictor Stinner2010-09-111-0/+14
| | | | | | | | | | | | a non-ASCII byte in the format string. Document also the encoding.
* | #5127: Even on narrow unicode builds, the C functions that access the UnicodeAmaury Forgeot d'Arc2010-08-181-0/+4
| | | | | | | | | | | | | | | | | | | | Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept and return characters from the full Unicode range (Py_UCS4). The differences from Python code are few: - unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit() now return the correct value for large code points - repr() may consider more characters as printable.
* | Remove unused test class.Eric Smith2010-08-121-5/+0
| |
* | Sub-issue of #9036: Fix incorrect use of Py_CHARMASK.Stefan Krah2010-07-191-0/+1
| |
* | Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.Ezio Melotti2010-07-011-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | 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) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 4) Add an extensive set of tests in test_unicode; 5) Fix test_codeccallbacks because it was failing after this change.
* | Merged revisions 81499,81506 via svnmerge fromBenjamin Peterson2010-06-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81499 | georg.brandl | 2010-05-24 16:29:07 -0500 (Mon, 24 May 2010) | 1 line #8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.) ........ r81506 | benjamin.peterson | 2010-05-24 17:04:53 -0500 (Mon, 24 May 2010) | 1 line set svn:eol-style ........
* | Merged revisions 81820 via svnmerge fromBenjamin Peterson2010-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line correctly overflow when indexes are too large ........
* | Merged revisions 79278,79280 via svnmerge fromVictor Stinner2010-03-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines Issue #1583863: An unicode subclass can now override the __str__ method ........ r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines Fix the NEWS about my last commit: an unicode subclass can now override the __unicode__ method (and not the __str__ method). Simplify also the testcase. ........
* | Clean up the warnings filter use in test_unicode.Brett Cannon2010-03-201-16/+10
| |
* | use assert[Not]In where appropriateBenjamin Peterson2010-01-191-26/+26
| | | | | | | | A patch from Dave Malcolm.
* | Merged revisions 74929 via svnmerge fromBenjamin Peterson2009-09-181-0/+4
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74929 | benjamin.peterson | 2009-09-18 16:14:55 -0500 (Fri, 18 Sep 2009) | 1 line add keyword arguments support to str/unicode encode and decode #6300 ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-38/+38
|/
* Issue #6150: Fix test_unicode on wide-unicode builds.Martin v. Löwis2009-06-011-6/+7
|
* Merged revisions 72848 via svnmerge fromEric Smith2009-05-231-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72848 | eric.smith | 2009-05-23 09:56:13 -0400 (Sat, 23 May 2009) | 1 line Issue 6089: str.format raises SystemError. ........