summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert r52798, r52803, r52824, r54342, as they don't fixMartin v. Löwis2008-03-021-18/+1
| | | | security issues.
* Add extra SHA testsAndrew M. Kuchling2006-11-201-1/+18
|
* Back port from 2.4 branch:Barry Warsaw2006-05-011-0/+10
| | | | | | | | | Patch #1464708 from William McVey: fixed handling of nested comments in mail addresses. E.g. "Foo ((Foo Bar)) <foo@example.com>" Fixes for both rfc822.py and email package.
* For reference, add tests for PCRE fix; the tests aren't run by default ↵Andrew M. Kuchling2005-08-311-0/+18
| | | | because I wanted to minimize upheaval to the 2.3 test suite
* sligtly strengthen unit tests for copy.pyAlex Martelli2005-02-071-1/+27
|
* fix bug 1114776Alex Martelli2005-02-061-0/+17
|
* copy.py fixed to first lookup __copy__ from the instance being copied,Anthony Baxter2005-01-251-1/+57
| | | | rather than only looking at the type - this was broken in 2.3.
* Use zlib test suite from the trunk (rev. 2.67) on the 2.3 maintenance branchAndrew M. Kuchling2004-12-281-170/+93
|
* Backport of fix for bug #1083645; skip test_imp if threading is not available.Brett Cannon2004-12-181-1/+5
|
* Don't have test_mkalias_relative exexute if sys.prefix does not exist.Brett Cannon2004-12-061-0/+2
| | | | Backport of fix for bug #1077302.
* SF 1055820: weakref callback vs gc vs threadsTim Peters2004-10-311-0/+199
| | | | | | | | In cyclic gc, clear all weakrefs to unreachable objects before allowing any Python code (weakref callbacks or __del__ methods) to run. This is a critical bugfix, affecting all versions of Python since weakrefs were introduced.
* Backport of fix for bug of year/<week of year>/<day of week> calculation thatBrett Cannon2004-10-281-4/+18
| | | | didn't handle %U for years starting on Monday.
* Add support for using %U and %W in strptime when year and day of the week areBrett Cannon2004-10-181-0/+24
| | | | | | also specified. Closes bug #1045381.
* Fix for SF bug #1029475 : reload() doesn't work with PEP 302 loaders.Phillip J. Eby2004-09-231-2/+16
| | | | (Backport to 2.3 maintenance branch.)
* backport ipv6 address fixSkip Montanaro2004-09-161-0/+12
|
* Backport [ 1010677 ] thread Module Breaks PyGILState_Ensure()Mark Hammond2004-09-011-0/+3
| | | | to the 2.3 maint branch.
* - Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).Matthias Klose2004-08-151-0/+8
|
* Patch #995782: Add FreeBSD 5 expectations.Martin v. Löwis2004-07-261-0/+1
|
* Remove test for #919008. Users may have old PyXML versions installed,Martin v. Löwis2004-07-181-35/+0
| | | | | in which case the test will fail. For the mainline, the test should stay, and the minimum required PyXML version needs to be raised.
* Backport:Guido van Rossum2004-07-141-0/+1
| | | | | | | | | - Bug #981530: Fix UnboundLocalError in shutil.rmtree(). This affects the documented behavior: the function passed to the onerror() handler can now also be os.listdir. [I could've sworn I checked this in, but apparently I didn't, or it got lost???]
* ntpath now compresses erroneous slashes between the drive letter and rest ofBrett Cannon2004-07-101-6/+5
| | | | | | the path. Also clarifies handling of UNC paths. Appropriate test were added. Fixes bug #980327 with patch #988607. Thanks Paul Moore.
* Raise an exception when trying to use shutil.move() to move a directory intoBrett Cannon2004-06-191-2/+13
| | | | | | itself. Closes bug #919012.
* SF 952807: Unpickling pickled instances of subclasses ofTim Peters2004-06-071-0/+33
| | | | | datetime.date, datetime.datetime and datetime.time could yield insane objects. Thanks to Jiwon Seo for a fix.
* [Bug #954364] inspect.getframeinfo() sometimes produces incorrect traceback ↵Andrew M. Kuchling2004-06-051-2/+2
| | | | line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me.
* [Bug #841757] Patch from /F to allow Unicode strings as struct keysAndrew M. Kuchling2004-06-051-0/+2
| | | | (Also a 2.2 bugfix candidate.)
* SF #965425: add WrapTestCase.test_punct_hyphens() to ensure thatGreg Ward2004-06-031-1/+18
| | | | | hyphenated words wrapped in punctuation, like "foo-bar" or [ding-dong], are split correctly.
* [Bug #962631] Fix typo reported by Bryan BlackburnAndrew M. Kuchling2004-06-011-1/+1
|
* SF #847346: add test_fix_sentence_endings() to ensure that sentenceGreg Ward2004-05-131-4/+42
| | | | | | | | | | endings get fixed even if the input is too short to wrap. Also throw in a bunch of other tests for this rather tricky and under-tested feature. In WrapTestCase.setUp(), don't bother setting fix_sentence_endings=True for self.wrapper -- just use a separate wrapper in the two tests that care about it, namely test_whitespace() and test_fix_sentence_endings().
* 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.
* 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.
* Backport to 2.3:Andrew MacIntyre2004-04-111-4/+19
| | | | | | | | | | Fixes for AF_UNIX support on OS/2: - 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.
* Backport to 2.3:Andrew MacIntyre2004-04-041-0/+17
| | | | | | | | | If a file is opened with an explicit buffer size >= 1, repeated 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.
* Backport 1.17:Guido van Rossum2004-03-311-0/+1
| | | | | | When /tmp has certain sticky bits set, newly created subdirectories inherit those bits, causing the test_mkdtemp.test_mode() test to fail. Remove those before comparing the actual mode to the expected mode.
* Ensure super() lookup of descriptor from classmethod works (SF ID# 743627)Phillip J. Eby2004-03-251-0/+14
| | | | (Backport to 2.3 maintenance branch)
* Fix test_strftime.py to escape locale time values that have characters thatBrett Cannon2004-03-201-2/+14
| | | | | might be mistaken for regex syntax. Fixes bug #883604 .
* Raise RuntimeError if the second argument to isinstance() or issubclass()Brett Cannon2004-03-201-0/+19
| | | | | | is a tuple nested to a depth beyond the interpreter's recursion limit to prevent a segfault from blowing the C stack. Fixes bug #858016 .
* 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)
* Backport checkin:Walter Dörwald2004-03-152-152/+149
| | | | | | Port test_binascii.py to PyUnit and enhance tests. Code coverage for binascii.c is at 92%. From SF patch #736962.
* adding passing test. testing for g(*Nothing()) where Nothing is a ↵Samuele Pedroni2004-02-212-0/+26
| | | | user-defined iterator.
* Backport checkin:Walter Dörwald2004-02-061-1/+1
| | | | Fix test failure message (from SF patch #885008)
* Backport checkin:Walter Dörwald2004-02-051-0/+1
| | | | | Fix reallocation bug in unicode.translate(): The code was comparing characters instead of character pointers to determine space requirements.
* Allocating a new weakref object can cause existing weakref objects forFred Drake2004-02-041-0/+32
| | | | | | | | | the same object to be collected by the cyclic GC support if they are only referenced by a cycle. If the weakref being collected was one of the weakrefs without callbacks, some local variables for the constructor became invalid and have to be re-computed. The test caused a segfault under a debug build without the fix applied.
* - add tests that exercise fixes for the PyWeakref_NewRef() andFred Drake2004-02-031-0/+49
| | | | | | PyWeakref_NewProxy() constructors from the C API - elaborate the getweakrefcount() and getweakrefs() tests slightly, including additional checks pulled from the trunk
* backport:Guido van Rossum2003-12-031-2/+2
| | | | | | | | Reduce the size of Big String and Big Binary tests to 2**14 (minus one for Big String). This should make the tests pass on Win98SE. Note that the docs only promise lengths up to 2048. Unfortunately this no longer tests for the segfault I was seeing earlier, but I'm confident I've nailed that one. :-) Fixes SF 852281.
* Add testcases for _winreg segfault (SF 851056).Guido van Rossum2003-11-301-1/+3
|
* backport:Anthony Baxter2003-11-301-1/+1
| | | | | Fix a bug discovered by Kalle Svensson: comparing sys.maxint to 2**32-1 makes no sense. Use 2**31-1 instead.
* test_guess_all_types(): Use a more robust test for checking thatBarry Warsaw2003-11-231-4/+7
| | | | | | | | | | guess_all_extensions() returns (at least) what we expect. As Jeff Epler suggests in http://mail.python.org/pipermail/python-dev/2003-September/038264.html We use a set to test the results. This fixes the test when test_urllib2 is run before test_mimetypes.
* Reverted from rev 1.45.6.1 to rev 1.45: deep recursion is still part ofTim Peters2003-11-221-9/+7
| | | | | | | | | | | sre in 2.3, and the backport of the 2.4 version of the tests should not have been done. It got confused because someone else checked a bad change into _sre.c that caused the tests that are *supposed* to raise a recursion exception to stop doing so on some (most?) platforms. test_re passes again on Windows now. Until the bad change to _sre gets fixed, it will fail on platforms other than Windows and FreeBSD, either by "Test Failed", or by bad consequences of C stack overflow.
* SF bug 839548: Bug in type's GC handling causes segfaults.Tim Peters2003-11-201-0/+205
| | | | | | | | Also SF patch 843455. This is a critical bugfix, backported from 2.4 development. I don't intend to backport beyond 2.3 maint. The bugs this fixes have been there since weakrefs were introduced.