summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
Commit message (Collapse)AuthorAgeFilesLines
* Tests for new surrogate support in the UTF-8 codec. By Bill Tutt.Marc-André Lemburg2000-07-071-0/+72
|
* Tests for new instance support in unicode().Marc-André Lemburg2000-07-071-0/+15
|
* Added tests for the new .isalpha() and .isalnum() methods.Marc-André Lemburg2000-07-051-0/+16
|
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-301-74/+0
| | | | Moved tests of new Unicode Char Name support to a separate test.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-281-0/+75
| | | | | Added tests for the new Unicode character name support in the standard unicode-escape codec.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-141-6/+0
| | | | | Removed a test which can fail when the default locale setting uses a Latin-1 encoding. The test case is not applicable anymore.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-131-3/+12
| | | | | | | | Fixed some tests to not cause the script to fail, but rather output a warning (which then is caught by regrtest.py as wrong output). This is needed to make test_unicode.py run through on JPython. Thanks to Finn Bock.
* Marc-Andre Lemburg <mal@lemburg.com>:Marc-André Lemburg2000-06-081-2/+2
| | | | | Updated to the fix in %c formatting: it now always checks for a one character argument.
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-05-091-0/+6
| | | | | Added another test for string formatting (the one that produced the core dump now fixed in unicodeobject.c).
* Get rid of memory leak caused by assingning sys.exc_info() to a local.Guido van Rossum2000-04-281-2/+2
| | | | Store sys.exc_info()[:2] instead.
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-04-131-0/+8
| | | | Added test for Unicode string concatenation.
* Marc-Andre Lemburg:Guido van Rossum2000-04-111-2/+1
| | | | | Modified .splitlines() tests according to the changes in unicodeobject.c.
* Marc-Andre Lemburg:Guido van Rossum2000-04-101-0/+29
| | | | | | | | * '...%s...' % u"abc" now coerces to Unicode just like string methods. Care is taken not to reevaluate already formatted arguments -- only the first Unicode object appearing in the argument mapping is looked up twice. Added test cases for this to test_unicode.py.
* Marc-Andre's third try at this bulk patch seems to work (except thatGuido van Rossum2000-04-051-8/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | his copy of test_contains.py seems to be broken -- the lines he deleted were already absent). Checkin messages: New Unicode support for int(), float(), complex() and long(). - new APIs PyInt_FromUnicode() and PyLong_FromUnicode() - added support for Unicode to PyFloat_FromString() - new encoding API PyUnicode_EncodeDecimal() which converts Unicode to a decimal char* string (used in the above new APIs) - shortcuts for calls like int(<int object>) and float(<float obj>) - tests for all of the above Unicode compares and contains checks: - comparing Unicode and non-string types now works; TypeErrors are masked, all other errors such as ValueError during Unicode coercion are passed through (note that PyUnicode_Compare does not implement the masking -- PyObject_Compare does this) - contains now works for non-string types too; TypeErrors are masked and 0 returned; all other errors are passed through Better testing support for the standard codecs. Misc minor enhancements, such as an alias dbcs for the mbcs codec. Changes: - PyLong_FromString() now applies the same error checks as does PyInt_FromString(): trailing garbage is reported as error and not longer silently ignored. The only characters which may be trailing the digits are 'L' and 'l' -- these are still silently ignored. - string.ato?() now directly interface to int(), long() and float(). The error strings are now a little different, but the type still remains the same. These functions are now ready to get declared obsolete ;-) - PyNumber_Int() now also does a check for embedded NULL chars in the input string; PyNumber_Long() already did this (and still does) Followed by: Looks like I've gone a step too far there... (and test_contains.py seem to have a bug too). I've changed back to reporting all errors in PyUnicode_Contains() and added a few more test cases to test_contains.py (plus corrected the join() NameError).
* Marc-Andre Lemburg:Guido van Rossum2000-03-281-45/+0
| | | | | | | | | | | | | | | The attached patch set includes a workaround to get Python with Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause is a bug in the BSDI wchar.h header file) and Python interfaces for the MBCS codec donated by Mark Hammond. Also included are some minor corrections w/r to the docs of the new "es" and "es#" parser markers (use PyMem_Free() instead of free(); thanks to Mark Hammond for finding these). The unicodedata tests are now in a separate file (test_unicodedata.py) to avoid problems if the module cannot be found.
* Marc-Andre Lemburg:Guido van Rossum2000-03-241-0/+30
| | | | | | | | | | Attached you find the latest update of the Unicode implementation. The patch is against the current CVS version. It includes the fix I posted yesterday for the core dump problem in codecs.c (was introduced by my previous patch set -- sorry), adds more tests for the codecs and two new parser markers "es" and "es#".
* On 17-Mar-2000, Marc-Andre Lemburg said:Barry Warsaw2000-03-201-0/+1
| | | | | | | | | | | | | Attached you find an update of the Unicode implementation. The patch is against the current CVS version. I would appreciate if someone with CVS checkin permissions could check the changes in. The patch contains all bugs and patches sent this week and also fixes a leak in the codecs code and a bug in the free list code for Unicode objects (which only shows up when compiling Python with Py_DEBUG; thanks to MarkH for spotting this one).
* Marc-Andre Lemburg: Add tests for mixed use of char in string.Guido van Rossum2000-03-131-0/+13
|
* Marc-Andre Lemburg: test script for Unicode implementation.Guido van Rossum2000-03-101-0/+281