summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* after discussions with perky, reverted fix for Bug #1379994: BuiltinAnthony Baxter2006-03-281-14/+22
| | | | | | | | | unicode_escape and raw_unicode_escape codec now encodes backslash correctly. This caused another issue for unicode repr strings being double-escaped (SF Bug #1459029). Correct fix will be in 2.5, but is too risky for 2.4.3. Added a testcase for #1459029.
* Merge rev 43181 from the trunk.Tim Peters2006-03-281-40/+47
| | | | | | | | | | | | | | | | | | | | | | | Try to repair at least one segfault on the Mac buildbot, as diagnosed by Nick Coghlan. test_capi.py: A test module should never spawn a thread as a side effect of being imported. Because this one did, the segfault one of its thread tests caused didn't occur until a few tests after test_regrtest.py thought test_capi was finished. Repair that. Also join() the thread spawned at the end, so that test_capi is truly finished when regrtest reports that it's done. _testcapimodule.c test_thread_state(): this spawns a couple of non-threading.py threads, passing them a PyObject* argument, but did nothing to ensure that those threads finished before returning. As a result, the PyObject* _could_ (although this was unlikely) get decref'ed out of existence before the threads got around to using it. Added explicit synchronization (via a Python mutex) so that test_thread_state can reliably wait for its spawned threads to finish.
* Backport of r41530 (neal.norwitz, 2005-11-24):Martin v. Löwis2006-03-271-17/+18
| | | | | | | Move registration of the codec search function to the module scope so it is only executed once. Otherwise the same search function is repeated added to the codec search path when regrtest is run with -R and leaks are reported.
* Backport:Neal Norwitz2006-03-261-1/+4
| | | | | | Handle sys.getfilesystemencoding() returning None. ascii seems like the safest bet, it should exist. I wonder if utf-8 would be a better choice? This should get test_fileinput passing on OpenBSD.
* Mechanical whitespace normalization.Tim Peters2006-03-233-5/+5
|
* Change SystemError into SyntaxError, when a Unicode stringMartin v. Löwis2006-03-221-0/+4
| | | | | containing an encoding declaration is compile()d. Fixes #1115379.
* Merge revs 42842, 42844, and part of a whitespace normalizationTim Peters2006-03-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | patch from the trunk. This stops test_socket_ssl from dying with: TypeError: 'NoneType' object is not callable in urlparsre.py's urljoin() when the tests are run in this order: test_??? test_importhooks test_socket_ssl "test_???" can be various things, but must be there. For example, test_urllibnet "works" to provoke the failure. Alas, nobody actually understands _why_ test_socket_ssl fails then, or why this hack makes the problem go away. Amazingly, the tests just happened to run in the right order on the 2.4 branch on two Windows buildbot slaves today, causing them both to fail their most recent test runs before this patch.
* Backport 43147:Neal Norwitz2006-03-201-0/+11
| | | | | Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace() returns a non-string when converting %Z.
* Merge rev 43091 from the trunk.Tim Peters2006-03-181-1/+1
| | | | | | | | | | | """ Try to find a host that responds slower from python.org so this test does not fail on macteagle (G4 OSX.4 in buildbot) """ Since testConnectTimeout() frequently fails in the same way in 2.4 branch, and this patch seems to have fixed it on the trunk, it should fix it on the 2.4 branch too.
* Merge rev 43081 from trunk.Tim Peters2006-03-161-13/+13
| | | | Set eol-style to native.
* Merge rev 43079 from the trunk. This should allow test_winsound to passTim Peters2006-03-162-34/+128
| | | | | | | | on a box without a sound card. Update test_winsound to check for a configured sound card (using a VBScript helper written by Roger Upole and Mark Hammond) and adjust the expected PlaySoundTest case results accordingly.
* Backport 42932:Neal Norwitz2006-03-141-8/+2
| | | | | | | | | Try to be a bit more consistent on all platforms: python . python < . both print a message, return non-zero and do not core dump. This hopefully fixes the failure on Solaris.
* Backport from trunk r42989:Hye-Shik Chang2006-03-131-0/+7
| | | | | Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle SS2 (single-shift 2) escape sequences correctly.
* Merge rev 42963 from the trunk.Tim Peters2006-03-131-0/+2
| | | | | | | When the new -w option (yay! great idea) reruns a failed test, first display the name of the test (else it's not always clear from the output which test is getting run).
* Merge rev 41859 from the trunk.Tim Peters2006-03-131-0/+9
| | | | | | | | | | | test_main(): Restore the original root logger level after running the tests. This stops the confusing/annoying: No handlers could be found for logger "cookielib" message we got whenever some test running after test_logging happened to use cookielib.py (when not using regrtest's -r, this happened during test_urllib2; when using -r, it varied).
* Merge rev 42904 from the trunk.Tim Peters2006-03-111-1/+4
| | | | | | | | | | | | | | | | | _hotshot hotshot_profiler(): If write_header() returned an error code, this let `self` leak. This is a disaster on Windows, since `self` already points to a newly-opened file object, and it was impossible for Python code to close the thing since the only reference to it was in a blob of leaked C memory. test_hotshot test_bad_sys_path(): This new test provoked the C bug above. This test passed, but left an open "@test" file behind, which caused a massive cascade of bogus test failures in later, unrelated tests on Windows. Changed the test code to remove the @test file it leaves behind, which relies on the change above to close that file first.
* Backport of 42960, to support the options buildbot uses.Martin v. Löwis2006-03-101-3/+20
|
* Backport trunk's r42878 (neal.norwitz):Thomas Wouters2006-03-071-0/+13
| | | | | | | | Thanks to Coverity, these were all reported by their Prevent tool. and r42881 (thomas.wouters): Don't DECREF a borrowed reference.
* Backport revision 42872:Walter Dörwald2006-03-061-5/+9
| | | | | If size is specified, try to read at least size characters. This is a alternative version of patch #1379332.
* Bug #1101233: fix test_fcntl on netbsd2 platform.Georg Brandl2006-02-201-1/+1
|
* Backported from r41842.Armin Rigo2006-02-202-0/+112
|
* Patch #1337756: fileinput now accepts Unicode filenames.Georg Brandl2006-02-191-0/+10
|
* Backport: This should get test_timeout to pass when running on any ↵Neal Norwitz2006-02-181-0/+5
| | | | python.org host.
* Fix typoNeal Norwitz2006-02-041-1/+1
|
* Work around a Solaris peculiarity that caused test_pty to sometimes fail: aThomas Wouters2006-01-281-1/+8
| | | | | | | tty opened by os.openpty() isn't always a tty according to os.isatty(), when it's tested inside the process that opened it. Doesn't affect actual functionality, as using a tty this way is rarely, if ever, useful. Ignoring the failure allows the test for actual functionality to continue.
* Remove file even if non-existantNeal Norwitz2006-01-251-2/+6
|
* Remove generated test db filesNeal Norwitz2006-01-251-2/+3
|
* Backport:Neal Norwitz2006-01-251-0/+6
| | | | Fix bug #1413192, fix seg fault in bsddb if a txn was deleted before the env.
* Checkin the test of patch #1400181.Georg Brandl2006-01-201-0/+14
|
* Backport:Neal Norwitz2006-01-142-0/+9
| | | | | | | Fix SF bug #1402308, segfault when using mmap(-1, ...) This didn't crash on Linux, but valgrind complained. I'm not sure if this test is valid on Windows.
* Test curses.setupterm() before initscr().Georg Brandl2006-01-121-2/+3
|
* Backport:Neal Norwitz2006-01-101-1/+7
| | | | | | SF bug #1400822, Extended version of _curses over{lay,write} does not work Fix signatures to conform to doc (also fixed ungetmouse()).
* Backport:Neal Norwitz2006-01-091-0/+11
| | | | | Bug #1400115, Fix segfault when calling curses.panel.userptr() without prior setting of the userptr.
* Skip this test on Darwin. It's skipped on the trunk and is listed asSkip Montanaro2006-01-071-0/+6
| | | | an expected skip in regrtest.py. Make it so.
* Backport:Neal Norwitz2006-01-061-4/+7
| | | | | | | | | | | | initscr() will exit if there's an error. Try to catch the obvious failure cases if TERM isn't set or is unknown (perhaps we should only check if unset or empty?) Skip the test if TERM isn't set. This seems to occur when running under buildbot and presumably cron. For some more info check here: http://mail.python.org/pipermail/python-checkins/2006-January/048704.html
* Backport: If the audio file does not exist, the test should be skipped.Neal Norwitz2006-01-052-2/+2
|
* Backport: Skip test_curses if stdin is not a tty (like when run from cron or ↵Neal Norwitz2006-01-051-1/+3
| | | | buildbot).
* Work around test_locale failing on Solaris 10.Martin v. Löwis2005-12-301-3/+8
|
* backport Sniffer class fix (rev 41838)Skip Montanaro2005-12-281-0/+4
|
* Backport: Patch #1117398: fix cookielib LoadErrorNeal Norwitz2005-12-231-0/+25
|
* Bug #1379994: Fix *unicode_escape codecs to encode r'\' as r'\\'Hye-Shik Chang2005-12-171-10/+14
| | | | just like string codecs.
* fix recurring typo: occured --> occurredFred Drake2005-11-302-2/+2
| | | | (already fixed in Python trunk)
* fix indentation; this could not have passedFred Drake2005-11-301-3/+3
|
* Backport checkin:Walter Dörwald2005-11-251-2/+12
| | | | | | SF patch #1364545: test_cmd_line.py relied on english error messages when invoking the Python interpreter (which didn't work on non-english Windows versions). Check return codes instead.
* [Patch #1094164] replaceChild(x,x) ends up removing x from the tree. Add ↵Andrew M. Kuchling2005-11-221-0/+11
| | | | fix from Felix Rabe and a test case
* [Patch #1350573] zlib.crc32 doesn't handle 0xffffffff seed. Add tests and ↵Andrew M. Kuchling2005-11-221-0/+2
| | | | bugfix. Bug reported by John Schmidt; bugfix by Danny Yoo.
* Backport (with output/test_poll):Neal Norwitz2005-11-032-0/+22
| | | | | Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint Need to check return result of PyInt_AsLong()
* Backport:Neal Norwitz2005-11-021-1/+1
| | | | | | Fix SF #1345263, colorsys tests, bug in frange Fix a typo that caused step to be ignored.
* Backport:Neal Norwitz2005-10-281-0/+24
| | | | | - Patch #1338314, Bug #1336623: fix tarfile so it can extract REGTYPE directories from tarfiles written by old programs.
* Backport: SF bug #1167751: fix incorrect code being for generator expressions.Neal Norwitz2005-10-231-0/+12
|