summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2003-02-191-15/+15
|
* Change filtertuple() to use tp_as_sequence->sq_itemWalter Dörwald2003-02-101-2/+1
| | | | | instead of PyTuple_GetItem, so an overwritten __getitem__ in a tuple subclass works. SF bug #665835.
* Change filterstring() and filterunicode(): If theWalter Dörwald2003-02-101-13/+27
| | | | | | | | | | | | 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).
* patch #683515: "Add unicode support to compile(), eval() and exec"Just van Rossum2003-02-101-0/+4
| | | | Incorporated nnorwitz's comment re. Py__USING_UNICODE.
* patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bomJust van Rossum2003-02-091-0/+4
| | | | mark. Added unit test.
* Make sure filter() never returns tuple, str or unicodeWalter Dörwald2003-02-041-0/+23
| | | | subclasses. (Discussed in SF patch #665835)
* Add a test that checks that filter() honors the sq_item slot forWalter Dörwald2003-02-041-0/+13
| | | | | str and unicode subclasses not just for generating the output but for testing too.
* filterstring() and filterunicode() in Python/bltinmodule.cWalter Dörwald2003-02-041-0/+21
| | | | | | | | | | | | | 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.
* Fix SF bug# 676155, RuntimeWarning with tp_compareNeal Norwitz2003-01-281-0/+1
| | | | Check return value of PyLong_AsDouble(), it can return an error.
* Fix comment typosWalter Dörwald2003-01-271-3/+4
|
* Patch #636005: Filter unicode into unicode.Martin v. Löwis2003-01-251-0/+6
|
* Combine test_b1.py and test_b2.py into test_builtin.py,Walter Dörwald2003-01-191-9/+1075
| | | | | | | | 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)
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-3/+3
| | | | | | | | 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.
* Initial revisionGuido van Rossum1992-01-271-0/+13