summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Add a test to verify an early call to iter() on the outermost forRaymond Hettinger2004-05-201-0/+9
| | | | expression.
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-194-1/+304
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* ConfigParser:Fred Drake2004-05-182-0/+23
| | | | | | - read() method returns a list of files parsed successfully - add tests, documentation (closes SF patch #677651)
* ConfigParser:Fred Drake2004-05-181-0/+31
| | | | | | | | - don't allow setting options to non-string values; raise TypeError when the value is set, instead of raising an arbitrary exception later (such as when string interpolation is performed) - add tests, documentation (closes SF bug #810843)
* ConfigParser:Fred Drake2004-05-181-4/+4
| | | | | | | | - ensure that option names in interpolations are handled by self.optionxform in the same way that other references to option names - add tests, documentation (closes SF bug #857881, patch #865455)
* test_alias_nofallback(): Someone broke this test, after 2.3, byTim Peters2004-05-161-2/+18
| | | | | converting it into assertRaises() form. Restored the 2.3 code, and explained why assertRaises() cannot be used instead.
* SF #847346: merge from release23-maint branch: remove misguidedGreg Ward2004-05-131-4/+42
| | | | | optimization for short input; beef up tests for fix_sentence_endings feature.
* Make sure "del d[n]" is properly supported. Was necessary because theRaymond Hettinger2004-05-121-3/+14
| | | | | | same method that implements __setitem__ also implements __delitem__. Also, there were several good use cases (removing items from a queue and implementing Forth style stack ops).
* Temporarily disable doctest until genexps are in CVSRaymond Hettinger2004-05-101-1/+1
|
* Add more examples.Raymond Hettinger2004-05-091-0/+51
|
* SF #950057: itertools.chain doesn't "process" exceptions as they occurRaymond Hettinger2004-05-081-0/+30
| | | | | | | Both cycle() and chain() were handling exceptions only when switching input sources. The patch makes the handle more immediate. Will backport.
* Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848.Martin v. Löwis2004-05-071-0/+9
| | | | Backported to 2.3.
* Do not use the default namespace for attributes.Martin v. Löwis2004-05-021-0/+14
| | | | | Fixes http://bugs.debian.org/229885 Will backport to 2.3.
* Add a test script for the colorsys module.Walter Dörwald2004-04-281-0/+76
|
* SF #926075: Fixed the bug that returns a wrong pattern object forHye-Shik Chang2004-04-201-0/+8
| | | | | a string or unicode object in sre.compile() when a different type pattern with the same value exists.
* Special case normalization of empty strings. Fixes #924361.Martin v. Löwis2004-04-171-0/+1
| | | | Backported to 2.3.
* * Add unittests for iterators that report their lengthRaymond Hettinger2004-04-121-0/+245
| | | | | | * Document the differences between them * Fix corner cases covered by the unittests * Use Py_RETURN_NONE where possible for dictionaries
* Fixes for AF_UNIX support on OS/2:Andrew MacIntyre2004-04-111-4/+19
| | | | | | | | | - return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
* If a file is opened with an explicit buffer size >= 1, repeatedAndrew MacIntyre2004-04-041-0/+17
| | | | | | | | close() calls would attempt to free() the buffer already free()ed on the first close(). [bug introduced with patch #788249] Making sure that the buffer is free()ed in file object deallocation is a belt-n-braces bit of insurance against a memory leak.
* Fix support for the "prog" keyword to the OptionParser constructor, as wellFred Drake2004-04-011-0/+16
| | | | | | as directly setting the .prog attribute (which should be supported based on the class docstring). Closes SF bug #850964.
* When /tmp has certain sticky bits set, newly created subdirectoriesGuido van Rossum2004-03-311-0/+1
| | | | | inherit those bits, causing the test_mkdtemp.test_mode() test to fail. Remove those before comparing the actual mode to the expected mode.
* SF bug 924242: socket._fileobject._getclosed() returns wrong valueTim Peters2004-03-281-0/+8
| | | | | | The .closed property always returned the wrong result. Bugfix candidate!
* Fix test failure for test_tcl on OS/X and Windows if aDavid Ascher2004-03-261-7/+1
| | | | | | | | | | | version of Tcl other than ActiveTcl is installed (ActiveTcl included TclX, other Tcl distros didn't). I'm removing the package loading test because it's hard to come up with a package that is guaranteed to be in any Tcl installation. Special-casing darwin and windows is ok since that leaves the only Tk platform (X) which the test was trying to address.
* Marshal clean-up (SF patch #873224)Armin Rigo2004-03-261-0/+5
|
* Ensure super() lookup of descriptor from classmethod works (SF #743627)Phillip J. Eby2004-03-251-0/+14
|
* Enable the profiling of C functions (builtins and extensions)Nicholas Bastin2004-03-242-2/+14
|
* Add test case for unicode(somestring, "idna").Martin v. Löwis2004-03-241-1/+6
|
* Added global runctx function to profile to fix SF Bug #716587Nicholas Bastin2004-03-222-6/+20
|
* The fix in ceval.c 2.386 allows iteration-by-iteration line tracing even inArmin Rigo2004-03-221-0/+23
| | | | single-line loops.
* Fix (really) for tight loop line eventsNicholas Bastin2004-03-221-1/+2
|
* Test for tight loop line event fix, SF bug #765624Nicholas Bastin2004-03-221-0/+25
|
* Test for lack of implicit return line eventNicholas Bastin2004-03-221-9/+27
|
* SF bug 847019 datetime.datetime initialization needs more strict checkingTim Peters2004-03-211-0/+20
| | | | | | | | | It's possible to create insane datetime objects by using the constructor "backdoor" inserted for fast unpickling. Doing extensive range checking would eliminate the backdoor's purpose (speed), but at least a little checking can stop honest mistakes. Bugfix candidate.
* Normalized files in test_unicode_file to eliminate failure on OSXNicholas Bastin2004-03-211-9/+29
|
* Deal with case of when locale time values has characters that can be mistakenBrett Cannon2004-03-201-2/+14
| | | | | for regex syntax. Fixes bug #883604 .
* Limit the nesting depth of a tuple passed as the second argument toBrett Cannon2004-03-201-1/+18
| | | | isinstance() or issubclass() to the recursion limit of the interpreter.
* commit the portion of PyXML patch #919008 that is relevant to theFred Drake2004-03-201-0/+35
| | | | | | | standard library: str() of xml.sax.SAXParseException should not fail if the line and/or column number returned by the locator are None (tests added)
* Port test_binascii.py to PyUnit and enhance tests.Walter Dörwald2004-03-152-152/+149
| | | | | Code coverage for binascii.c is at 92%. From SF patch #736962.
* SF feature request #686323: Minor array module enhancementsRaymond Hettinger2004-03-141-0/+7
| | | | | | | array.extend() now accepts iterable arguments implements as a series of appends. Besides being a user convenience and matching the behavior for lists, this the saves memory and cycles that would be used to create a temporary array object.
* SF bug #910986: copy.copy fails for array.arrayRaymond Hettinger2004-03-131-0/+7
| | | | Added support for the copy module.
* Make test_coercion.py less sensitive to platform fp quirks. ClosesNeil Schemenauer2004-03-102-333/+348
| | | | SF bug #678265.
* Tidied up the implementations of reversed (including the custom onesRaymond Hettinger2004-03-101-2/+2
| | | | | | | | | | | | | | | | | for xrange and list objects). * list.__reversed__ now checks the length of the sequence object before calling PyList_GET_ITEM() because the mutable could have changed length. * all three implementations are now tranparent with respect to length and maintain the invariant len(it) == len(list(it)) even when the underlying sequence mutates. * __builtin__.reversed() now frees the underlying sequence as soon as the iterator is exhausted. * the code paths were rearranged so that the most common paths do not require a jump.
* Eliminate the double reverse option. It's only use caseRaymond Hettinger2004-03-101-4/+1
| | | | was academic and it was potentially confusing to use.
* SF #904720: dict.update should take a 2-tuple sequence like dict.__init_Raymond Hettinger2004-03-043-11/+15
| | | | | | | | (Championed by Bob Ippolito.) The update() method for mappings now accepts all the same argument forms as the dict() constructor. This includes item lists and/or keyword arguments.
* Have strftime() check its time tuple argument to make sure the tuple's valuesBrett Cannon2004-03-022-1/+57
| | | | | | | | | | are within proper boundaries as specified in the docs. This can break possible code (datetime module needed changing, for instance) that uses 0 for values that need to be greater 1 or greater (month, day, and day of year). Fixes bug #897625.
* Replace left(), right(), and __reversed__() with the more general purposeRaymond Hettinger2004-03-011-9/+34
| | | | | | | __getitem__() and __setitem__(). Simplifies the API, reduces the code size, adds flexibility, and makes deques work with bisect.bisect(), random.shuffle(), and random.sample().
* Cleanup: remove test file after it is used.Neal Norwitz2004-02-291-0/+1
|
* Improvements to collections.deque():Raymond Hettinger2004-02-291-3/+89
| | | | | | | | * Add doctests for the examples in the library reference. * Add two methods, left() and right(), modeled after deques in C++ STL. * Apply the new method to asynchat.py. * Add comparison operators to make deques more substitutable for lists. * Replace the LookupErrors with IndexErrors to more closely match lists.
* Fix two bugs in the new do_open() implementation for HTTPHandler.Jeremy Hylton2004-02-241-1/+2
| | | | | | | | | Invoke the standard error handlers for non-200 responses. Always supply a "Connection: close" header to prevent the server from leaving the connection open. Downstream users of the socket may attempt recv()/read() with no arguments, which would block if the connection were kept open.
* adding passing test. testing for g(*Nothing()) where Nothing is a ↵Samuele Pedroni2004-02-212-0/+26
| | | | user-defined iterator.