summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* As mentioned on python-dev, reverting patch #1504333 because it introducedNeal Norwitz2006-09-112-15/+225
| | | | | | | | an infinite loop in rev 47154. This patch also adds a test to prevent the regression. Will backport to 2.4 and head later.
* Remove __unicode__ method so that ``unicode(BaseException)`` succeeds.Brett Cannon2006-09-092-2/+10
| | | | Fixes bug #1551432.
* Backport inspect.py fix from rev 51803Nick Coghlan2006-09-081-0/+11
|
* Backport from trunk r51737:Hye-Shik Chang2006-09-072-0/+8
| | | | | | | | | Fixed a few bugs on cjkcodecs: - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly. - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312 codepoints to conform the standard. - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2 codepoints now.
* No, the problem was actually because buildbot uses a StringIO inGustavo Niemeyer2006-09-061-6/+0
| | | | | place of sys.stdout while running tests. Removing one more test to make buildbot happy.
* Fixed bug #1531862: Do not close standard file descriptors in subprocess.Gustavo Niemeyer2006-09-061-0/+12
| | | | | | | | | Let's try that once more. Buildbots were broken last time, but probably because tests were sending data to stderr for testing it (sending to a file doesn't touch the problem). The fix is still the same, but tests were reduced (removing tests to be able to fix something is weird, but oh well).
* Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.Georg Brandl2006-09-061-26/+13
| | | | | | Also make sure that every exception class has __module__ set to 'exceptions'. (backport)
* Revert 51759 because it broke all the buildbotsNeal Norwitz2006-09-061-42/+0
|
* Backporting fix for bug #1531862, committed in 51758, into 2.5,Gustavo Niemeyer2006-09-061-0/+42
| | | | making subprocess not close standard file descriptors.
* Bug #1520864 (again): unpacking singleton tuples in list comprehensions andNeal Norwitz2006-09-051-0/+4
| | | | | | | generator expressions (x for x, in ... ) works again. Sigh, I only fixed for loops the first time, not list comps and genexprs too. I couldn't find any more unpacking cases where there is a similar bug lurking.
* Patch #1540470, for OpenBSD 4.0. Backport candidate for 2.[34].Neal Norwitz2006-09-052-2/+2
|
* Backport fix for SF bug #1550714, itertools.tee raises SystemErrorNeal Norwitz2006-09-051-0/+1
|
* Fix str.rpartition(sep) when sep is not found in str.Neal Norwitz2006-09-051-1/+1
| | | | Partially from SF patch #1551339, but also taken from head.
* Fix SF bug #1546288, crash in dict_equalNeal Norwitz2006-09-051-1/+9
|
* Backport of decimal module context management updates from rev 51694 to 2.5 ↵Nick Coghlan2006-09-032-26/+28
| | | | release branch
* - Patch #1541585: fix buffer overrun when performing repr() onNeal Norwitz2006-08-211-0/+4
| | | | | | a unicode string in a build with wide unicode (UCS-4) support. I will forward port to 2.6. Can someone backport to 2.4?
* Backport 51432:Neal Norwitz2006-08-211-0/+21
| | | | | Fix bug #1543303, tarfile adds padding that breaks gunzip. Patch # 1543897. (remove the padding)
* Patch #1542948: fix urllib2 header casing issue. With new test.Georg Brandl2006-08-201-7/+70
| | | | (backport from rev. 51416)
* Bug #1541863: uuid.uuid1 failed to generate unique identifiersMartin v. Löwis2006-08-181-1/+1
| | | | on systems with low clock resolution.
* Fix a bug in the ``compiler`` package that caused invalid code to beNeil Schemenauer2006-08-161-0/+7
| | | | generated for generator expressions.
* SF#1534630Fredrik Lundh2006-08-161-0/+11
| | | | ignore data that arrives before the opening start tag
* Update code and tests to support the 'bytes_le' attribute (forKa-Ping Yee2006-08-161-36/+61
| | | | | | | little-endian byte order on Windows), and to work around clocks with low resolution yielding duplicate UUIDs. Anthony Baxter has approved this change.
* Subclasses of int/long are allowed to define an __index__.Neal Norwitz2006-08-151-8/+9
|
* Fix the test for SocketServer so it should pass on cygwin and not failNeal Norwitz2006-08-151-0/+9
| | | | | | | | sporadically on other platforms. This is really a band-aid that doesn't fix the underlying issue in SocketServer. It's not clear if it's worth it to fix SocketServer, however, I opened a bug to track it: http://python.org/sf/1540386
* Whitespace normalization.Tim Peters2006-08-151-2/+2
|
* Add an additional test: BZ2File write methods should raise IOErrorGeorg Brandl2006-08-141-0/+9
| | | | when file is read-only.
* Patch #1535500: fix segfault in BZ2File.writelines and make sure itGeorg Brandl2006-08-141-0/+2
| | | | raises the correct exceptions.
* Make tabnanny recognize IndentationErrors raised by tokenize.Georg Brandl2006-08-142-0/+12
| | | | | Add a test to test_inspect to make sure indented source is recognized correctly. (fixes #1224621)
* Slightly revised version of patch #1538956:Marc-André Lemburg2006-08-141-0/+1
| | | | | | | | | | Replace UnicodeDecodeErrors raised during == and != compares of Unicode and other objects with a new UnicodeWarning. All other comparisons continue to raise exceptions. Exceptions other than UnicodeDecodeErrors are also left untouched.
* Fix segfault when doing string formatting on subclasses of long ifNeal Norwitz2006-08-131-0/+8
| | | | | | __oct__, __hex__ don't return a string. Klocwork 308
* Fix a couple of bugs exposed by the new __index__ code. The 64-bit buildbotsNeal Norwitz2006-08-121-2/+9
| | | | | | | | | | | were failing due to inappropriate clipping of numbers larger than 2**31 with new-style classes. (typeobject.c) In reviewing the code for classic classes, there were 2 problems. Any negative value return could be returned. Always return -1 if there was an error. Also make the checks similar with the new-style classes. I believe this is correct for 32 and 64 bit boxes, including Windows64. Add a test of classic classes too.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-121-48/+126
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* Repair logging test spew caused by rev. 51206.Georg Brandl2006-08-121-2/+2
|
* Ah, fudge. One of the prints here actually "shouldn't be"Tim Peters2006-08-121-2/+1
| | | | | | | | | protected by "if verbose:", which caused the test to fail on all non-Windows boxes. Note that I deliberately didn't convert this to unittest yet, because I expect it would be even harder to debug this on Tru64 after conversion.
* test_signal: Signal handling on the Tru64 buildbotTim Peters2006-08-122-65/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appears to be utterly insane. Plug some theoretical insecurities in the test script: - Verify that the SIGALRM handler was actually installed. - Don't call alarm() before the handler is installed. - Move everything that can fail inside the try/finally, so the test cleans up after itself more often. - Try sending all the expected signals in force_test_exit(), not just SIGALRM. Since that was fixed to actually send SIGALRM (instead of invisibly dying with an AttributeError), we've seen that sending SIGALRM alone does not stop this from hanging. - Move the "kill the child" business into the finally clause, so the child doesn't survive test failure to send SIGALRM to other tests later (there are also baffling SIGALRM-related failures in test_socket). - Cancel the alarm in the finally clause -- if the test dies early, we again don't want SIGALRM showing up to confuse a later test. Alas, this still relies on timing luck wrt the spawned script that sends the test signals, but it's hard to see how waiting for seconds can so often be so unlucky. test_threadedsignals: curiously, this test never fails on Tru64, but doesn't normally signal SIGALRM. Anyway, fixed an obvious (but probably inconsequential) logic error.
* Whoops, how did that get in there. :-) Revert all the parts of 51227 that ↵Neal Norwitz2006-08-121-7/+0
| | | | were not supposed to go it. Only Modules/_ctypes/cfields.c was supposed to be changed
* Check returned pointer is valid.Neal Norwitz2006-08-121-0/+7
| | | | Klocwork #233
* Fix the failures on cygwin (2006-08-10 fixed the actual locking issue).Neal Norwitz2006-08-111-5/+8
| | | | | | The first hunk changes the colon to an ! like other Windows variants. We need to always wait on the child so the lock gets released and no other tests fail. This is the try/finally in the second hunk.
* force_test_exit(): This has been completely ineffectiveTim Peters2006-08-111-1/+5
| | | | | | | at stopping test_signal from hanging forever on the Tru64 buildbot. That could be because there's no such thing as signal.SIGALARM. Changed to the idiotic (but standard) signal.SIGALRM instead, and added some more debug output.
* test_PyThreadState_SetAsyncExc(): This is failing on someTim Peters2006-08-111-3/+4
| | | | | | | | | | | 64-bit boxes. I have no idea what the ctypes docs mean by "integers", and blind-guessing here that it intended to mean the signed C "int" type, in which case perhaps I can repair this by feeding the thread id argument to type ctypes.c_long(). Also made the worker thread daemonic, so it doesn't hang Python shutdown if the test continues to fail.
* Whitespace normalization broke test_cgi, because a lineTim Peters2006-08-101-2/+2
| | | | | | of quoted test data relied on preserving a single trailing blank. Changed the string from raw to regular, and forced in the trailing blank via an explicit \x20 escape.
* Whitespace normalization.Tim Peters2006-08-101-1/+1
|
* Followup to bug #1069160.Tim Peters2006-08-101-0/+69
| | | | | | PyThreadState_SetAsyncExc(): internal correctness changes wrt refcount safety and deadlock avoidance. Also added a basic test case (relying on ctypes) and repaired the docs.
* Chris McDonough's patch to defend against certain DoS attacks on FieldStorage.Guido van Rossum2006-08-102-0/+71
| | | | SF bug #1112549.
* test_copytree_simple(): This was leaving behind two new tempTim Peters2006-08-101-16/+36
| | | | | | | | | | | | | | directories each time it ran, at least on Windows. Several changes: explicitly closed all files; wrapped long lines; stopped suppressing errors when removing a file or directory fails (removing /shouldn't/ fail!); and changed what appeared to be incorrect usage of os.removedirs() (that doesn't remove empty directories at and /under/ the given path, instead it must be given an empty leaf directory and then deletes empty directories moving /up/ the path -- could be that the conceptually simpler shutil.rmtree() was really actually intended here).
* Concatenation on a long string breaks (SF #1526585).Armin Rigo2006-08-093-2/+69
|
* Fix and test for an infinite C recursion.Armin Rigo2006-08-091-0/+4
|
* __hash__ may now return long int; the final hashMartin v. Löwis2006-08-091-0/+9
| | | | | value is obtained by invoking hash on the long int. Fixes #1536021.
* Whitespace normalization.Tim Peters2006-08-091-1/+1
|
* Remove accidently committed, duplicated test.Thomas Heller2006-08-081-2/+0
|