| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
raised, caught, and converted to a string.
|
| |
|
|
|
|
|
| |
Removed a test which can fail when the default locale setting
uses a Latin-1 encoding. The test case is not applicable anymore.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
test. Someone with more Linux audio knowledge should at least take a
brief look at it.
|
|
|
|
|
| |
Updated to the fix in %c formatting: it now always checks for
a one character argument.
|
|
|
|
|
| |
Fix test of the "math" module so it does not break on platforms that do
not offer rint(); just skip that portion of the test in that case.
|
| |
|
| |
|
|
|
|
|
| |
Added another test for string formatting (the one that
produced the core dump now fixed in unicodeobject.c).
|
|
|
|
|
|
|
|
| |
weird errors. (E.g. see thread "weird bug in test_winreg" in python-dev.)
Since it's actually useful to be able to re-run an individual test
after running test.autotest, we keep the unloading code, but only for
modules whose full name starts with "test.".
|
| |
|
|
|
|
| |
Store sys.exc_info()[:2] instead.
|
| |
|
| |
|
|
|
|
|
|
| |
the change to regrtest.py to unload all newly imported modules did
something bad to the threads -- and I realized that they would never
stop!
|
| |
|
|
|
|
|
| |
after each test has been run. This avoids excessive memory growth
during the tests.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
"""
In the course of debugging this I also saw that cPickle is
inconsistent with pickle - if you attempt a pickle.load or pickle.dump
on a closed file, you get a ValueError, whereas the corresponding
cPickle operations give an IOError. Since cPickle is advertised as
being compatible with pickle, I changed these exceptions to match.
"""
|
|
|
|
|
| |
Note that comparisons of deeply nested objects can still dump core in
extreme cases.
|
|
|
|
| |
Added test for Unicode string concatenation.
|
|
|
|
| |
Added test output for Unicode string concatenation test.
|
|
|
|
|
| |
Modified .splitlines() tests according to the changes
in stringobject.c.
|
|
|
|
|
| |
Modified .splitlines() tests according to the changes
in unicodeobject.c.
|
|
|
|
|
|
| |
[The test is in a slightly odd place, in test_division_2; but it
exercises the recent change to long_mult(), and that's all we really
ask for. --GvR]
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of assuming that the number process ids of the threads is the
same as the process id of the controlling process, use a copy of the
dictionary and check for changes in the process ids of the threads
from the thread's process ids in the parent process. This makes the
test make more sense on systems which assign a new pid to each thread
(i.e., Linux).
This doesn't fix the other problems evident with this test on Linux.
|
|
|
|
|
|
|
|
| |
* '...%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.
|
|
|
|
| |
* More test cases for test_contains.py.
|
|
|
|
| |
recently changed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
This patch fixes the mmap module on Windows 9x.
Also updates the mmap test to remove the test file.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
was a superfluous check for the platform.
|
| |
|
|
|
|
| |
add test cases for non-UserList class, tuple, & string
|
|
|
|
|
|
|
| |
If a non-tuple sequence is passed as the *arg, convert it to a tuple
before checking its length.
If named keyword arguments are used in combination with **kwargs, make
a copy of kwargs before inserting the new keys.
|
|
|
|
| |
Win32 test case.
|
|
|
|
| |
Win32 test case
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|