summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* The test data (mostly example messages) for the email package testBarry Warsaw2001-09-2316-0/+643
| | | | suite. Note that other tests can put input data in this directory.
* An extensive test suite for the email package.Barry Warsaw2001-09-231-0/+797
|
* The email package version 1.0, prototyped as mimelibBarry Warsaw2001-09-2312-0/+1302
| | | | | | <http://sf.net/projects/mimelib>. There /are/ API differences between mimelib and email, but most of the implementations are shared (except where cool Py2.2 stuff like generators are used).
* New function classify_class_attrs(). As a number of SF bug reportsTim Peters2001-09-232-0/+286
| | | | | | | | | | | | | | | | | | | point out, pydoc doesn't tell you where class attributes were defined, gets several new 2.2 features wrong, and isn't aware of some new features checked in on Thursday <wink>. pydoc is hampered in part because inspect.py has the same limitations. Alas, I can't think of a way to fix this within the current architecture of inspect/pydoc: it's simply not possible in 2.2 to figure out everything needed just from examining the object you get back from class.attr. You also need the class context, and the method resolution order, and tests against various things that simply didn't exist before. OTOH, knowledge of how to do that is getting quite complex, so doesn't belong in pydoc. classify_class_attrs takes a different approach, analyzing all the class attrs "at once", and returning the most interesting stuff for each, all in one gulp. pydoc needs to be reworked to use this for classes (instead of the current "filter dir(class) umpteen times against assorted predicates" approach).
* Make difflib.ndiff() and difflib.Differ.compare() generators. ThisTim Peters2001-09-221-53/+47
| | | | | restores the 2.1 ability of Tools/scripts/ndiff.py to start producing output before the entire comparison is complete.
* Add a function to compute a class's method resolution order. This isTim Peters2001-09-222-0/+38
| | | | | | easy for 2.2 new-style classes, but trickier for classic classes, and different approaches are needed "depending". The function will allow later code to treat all flavors of classes uniformly.
* Since the most likely failure mode for an expected-output test is a changeTim Peters2001-09-221-15/+22
| | | | | | | somewhere inside a line, use ndiff so that intraline difference marking can point out what changed within a line. I don't remember diff-style abbreviations either (haven't used it since '94, except to produce patches), so say the rest in English too.
* __iter__(): New method so that StringIO's can participate in theBarry Warsaw2001-09-221-0/+3
| | | | iterator protocol.
* Converted test_StringIO.py to use unittest, soBarry Warsaw2001-09-222-62/+71
| | | | | | | Lib/test/output/test_StringIO is no longer necessary. Also, added a test of the iterator protocol that's just been added to StringIO's and cStringIO's.
* Start of a test to make sure the profiler/tracer support in the coreFred Drake2001-09-221-0/+110
| | | | interpreter is reporting what we expect to see.
* Add the __getattr__ hook back. The rules are now:Guido van Rossum2001-09-211-5/+4
| | | | | | | - if __getattribute__ exists, it is called first; if it doesn't exists, PyObject_GenericGetAttr is called first. - if the above raises AttributeError, and __getattr__ exists, it is called.
* reportdiff(): print a "plain diff" style diff.Guido van Rossum2001-09-211-4/+30
| | | | XXX This should really be a unified diff, but I can't be bothered.
* Oops. I didn't expect that some tests (test_cookie) have expectedGuido van Rossum2001-09-212-9/+3
| | | | | output *and* doctest stuff. Assuming the doctest stuff comes after the expected output, this fixes that.
* Change the way unexpected output is reported: rather than stopping atGuido van Rossum2001-09-212-94/+52
| | | | | | | | | | the first difference, let the test run till completion, then gather all the output and compare it to the expected output using difflib. XXX Still to do: produce diff output that only shows the sections that differ; currently it produces ndiff-style output because that's the easiest to produce with difflib, but this becomes a liability when the output is voluminous and there are only a few differences.
* Change the name of the __getattr__ special method for new-styleGuido van Rossum2001-09-212-7/+7
| | | | | | | | classes to __getattribute__, to make it crystal-clear that it doesn't have the same semantics as overriding __getattr__ on classic classes. This is a halfway checkin -- I'll proceed to add a __getattr__ hook that works the way it works in classic classes.
* Make these modules work when Python is compiled without Unicode support.Guido van Rossum2001-09-213-5/+18
|
* Add tests for repr() of strings containing string quotes as well.Guido van Rossum2001-09-211-0/+4
|
* Test basic functioning of unicode repr(). (If this breaks Jython,Guido van Rossum2001-09-211-0/+11
| | | | please let me know and we'll figure out how to fix the test.)
* Add a small test to verify that member and getset descriptors now haveGuido van Rossum2001-09-201-0/+8
| | | | docstrings (using file.closed and file.name as examples).
* Change testdescr.py to use the test_main() approach.Guido van Rossum2001-09-201-4/+4
|
* Change the PyUnit-based tests to use the test_main() approach. ThisFred Drake2001-09-2034-39/+229
| | | | | allows using the tests with unittest.py as a script. The tests will still run when run as a script themselves.
* Fix Unicode .join() method to raise a TypeError for sequenceMarc-André Lemburg2001-09-201-1/+0
| | | | | | | | | | elements which are not Unicode objects or strings. (This matches the string.join() behaviour.) Fix a memory leak in the .join() method which occurs in case the Unicode resize fails. Restore the test_unicode output.
* Update test output after the unicode() change.Marc-André Lemburg2001-09-201-0/+1
|
* Python part of the UTF-7 codec by Brian Quinlan.Marc-André Lemburg2001-09-201-0/+27
|
* Implement the changes proposed in patch #413333. unicode(obj) nowMarc-André Lemburg2001-09-201-0/+5
| | | | | works just like str(obj) in that it tries __str__/tp_str on the object in case it finds that the object is not a string or buffer.
* Patch #435971: UTF-7 codec by Brian Quinlan.Marc-André Lemburg2001-09-202-1/+32
|
* Patch #462635 by Andrew Kuchling correcting bugs in the newMarc-André Lemburg2001-09-205-11/+21
| | | | | codecs -- the self argument does matter for Python functions (it does not for C functions which most other codecs use).
* run_suite(): Oops, update a docstring.Barry Warsaw2001-09-201-1/+1
|
* run_suite(): Factor this out of run_unittest() for tests that buildBarry Warsaw2001-09-201-2/+7
| | | | | | | | their own test suite from a multitude of classes (like test_email.py will be doing). run_unittest(): Call run_suite() after making a suite from the testclass.
* Since inspect.isfunction(obj) is a precondition for callingTim Peters2001-09-201-6/+6
| | | | | | | | inspect.getargspec(obj), test isfunction() directly in pydoc.py instead of trying to indirectly deduce isfunction() in pydoc by virtue of failing a combination of other tests. This shouldn't have any visible effect, except perhaps to squash a TypeError death if there was some path thru this code that was inferring isfunction() by mistake.
* Ensure that isfunction(obj) and (the new) ismethoddescriptor(obj) neverTim Peters2001-09-201-5/+8
| | | | | both return true. This restores pydoc's ability to deduce argument lists for functions and methods coded in Python.
* After much thrashing, I believe this is a truly minimal patch to teachTim Peters2001-09-202-4/+27
| | | | | pydoc how to do something sensible with 2.2 descriptors. To see the difference, browse __builtin__ via pydoc before and after the patch.
* Patch #461321: Support None as a timeout in poll2 and poll3.Martin v. Löwis2001-09-191-4/+6
|
* Keep tabnanny happy.Guido van Rossum2001-09-191-1/+1
|
* Fixed search function error reporting in the encodings packageMarc-André Lemburg2001-09-191-7/+11
| | | | | | | | __init__.py module to raise errors which can be catched as LookupErrors as well as SystemErrors. Modified the error messages to include more information about the failing module.
* Added new helpers for easy access to codecs. Docs will follow.Marc-André Lemburg2001-09-191-0/+42
|
* Patch to bug #461754: CDATA should not undergo entity subst.Martin v. Löwis2001-09-191-1/+1
|
* Add additional coercion support for "self subtypes" to int, long,Guido van Rossum2001-09-191-0/+28
| | | | float (compare the recent checkin to complex). Added tests for these.
* Enable two checks for comparing a complex to a complex subtypeGuido van Rossum2001-09-191-3/+4
| | | | | | | | | instance. Split a string comparison test in two halves, replacing "a==b==a" with separate tests for a==b and b==a. (Reason: while experimenting, this test failed, and I wanted to know if it was the first or the second == operator that failed.)
* Enable some comparison tests that failed before. Still having problemsTim Peters2001-09-181-3/+3
| | | | with subsclasses of complex and string.
* Add a similar test for rich comparisons.Guido van Rossum2001-09-181-1/+67
|
* fixed #449964: sre.sub raises an exception if the template contains aFredrik Lundh2001-09-183-9/+14
| | | | | | \g<x> group reference followed by a character escape (also restructured a few things on the way to fixing #449000)
* Hopefully fix 3-way comparisons. This unfortunately adds yet anotherGuido van Rossum2001-09-181-0/+28
| | | | | | | | hack, and it's even more disgusting than a PyInstance_Check() call. If the tp_compare slot is the slot used for overrides in Python, it's always called. Add some tests that show what should work too.
* Get rid of a superfluous space after "--" in the message printed for aGuido van Rossum2001-09-181-2/+1
| | | | skipped test -- the print command already supplies a space.
* Fix typo in commentAndrew M. Kuchling2001-09-181-1/+1
|
* Test for the safety check in wrap_cmpfunc().Guido van Rossum2001-09-181-0/+15
|
* an SRE bugfix a day keeps Guido away...Fredrik Lundh2001-09-182-4/+11
| | | | | | | #462270: sub-tle difference between pre.sub and sre.sub. PRE ignored an empty match at the previous location, SRE didn't. also synced with Secret Labs "sreopen" codebase.
* SF bug #417176 (Martijn Pieters): MultiFile.read() includes CRLFGuido van Rossum2001-09-181-1/+13
| | | | | | | | | boundary. Fixed by keeping a readahead buffer containing the next line. XXX We have no test suite for this. Maybe the new email package will help?
* softspace(): be prepared to catch AttributeError as well as TypeErrorGuido van Rossum2001-09-181-1/+2
| | | | upon attempted attribute assignment. Caught by MWH, SF bug #462522.
* This module didn't work at all anymore -- blew up with AttributeErrorTim Peters2001-09-181-2/+6
| | | | | | | on file.__methods__. Since the docs say "This module will become obsolete in a future release", this is just a quick hack to stop it from blowing up. If you care about this module, test it! It doesn't make much sense on Windows.