| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
instead of PyTuple_GetItem, so an overwritten __getitem__
in a tuple subclass works. SF bug #665835.
|
|
|
|
|
|
|
|
|
|
|
|
| |
object is not a real str or unicode but an instance
of a subclass, construct the output via looping
over __getitem__. This guarantees that the result
is the same for function==None and function==lambda x:x
This doesn't happen for tuples, because filtertuple()
uses PyTuple_GetItem().
(This was discussed on SF bug #665835).
|
|
|
|
| |
Incorporated nnorwitz's comment re. Py__USING_UNICODE.
|
|
|
|
| |
mark. Added unit test.
|
|
|
|
| |
subclasses. (Discussed in SF patch #665835)
|
|
|
|
|
| |
str and unicode subclasses not just for generating the output
but for testing too.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blindly assumed that tp_as_sequence->sq_item always returns
a str or unicode object. This might fail with str or unicode
subclasses.
This patch checks whether the object returned from __getitem__
is a str/unicode object and raises a TypeError if not (and
the filter function returned true).
Furthermore the result for __getitem__ can be more than one
character long, so checks for enough memory have to be done.
|
|
|
|
| |
Check return value of PyLong_AsDouble(), it can return an error.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
port the tests to PyUnit and add many tests for error
cases. This increases code coverage in Python/bltinmodule.c
from 75% to 92%. (From SF patch #662807, with
assert_(not fcmp(x, y)) replaced with assertAlmostEqual(x, y)
where possible)
|
|
|
|
|
|
|
|
| |
imports of test modules now import from the test package. Other
related oddities are also fixed (like DeprecationWarning filters that
weren't specifying the full import part, etc.). Also did a general
code cleanup to remove all "from test.test_support import *"'s. Other
from...import *'s weren't changed.
|
|
|