summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Socket handler closed prior to end of test.Vinay Sajip2004-02-201-0/+1
|
* Get test to work when run from regrtest (add test_main), remove all CRs (^M)sNeal Norwitz2004-02-191-3/+5
|
* Implementation of patch 869468David Ascher2004-02-181-0/+159
| | | | | | | | | | | | | | | Allow the user to create Tkinter.Tcl objects which are just like Tkinter.Tk objects except that they do not initialize Tk. This is useful in circumstances where the script is being run on machines that do not have an X server running -- in those cases, Tk initialization fails, even if no window is ever created. Includes documentation change and tests. Tested on Linux, Solaris and Windows. Reviewed by Martin von Loewis.
* further testing indicates that the simplified version of the testFred Drake2004-02-131-4/+6
| | | | | | | | | | (re-using an existing test object class) no longer triggered the original segfault when the fix was backed out; restoring the local test object class to make the test effective the assignment of the ref created at the end does not affect the test, since the segfault happended before weakref.ref() returned; removing the assignment
* use existing test object instead of defining a new classFred Drake2004-02-121-5/+3
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-1228-86/+86
| | | | From SF patch #852334.
* Fix indentation error in testGetServByName and rewrite loop to avoid clumsySkip Montanaro2004-02-101-5/+2
| | | | sentinel variable
* Make reversed() transparent with respect to length.Raymond Hettinger2004-02-101-0/+4
|
* Give itertools.repeat() a length method.Raymond Hettinger2004-02-101-1/+7
|