Commit Graph

3429 Commits

Author SHA1 Message Date
Tim Peters
2870125e0e Merge rev 43734 from the trunk.
test_timeout():  This test was added during Bug Day, but disabled
soon after because the gmail address it connects to started timing
out on all the buildbot slaves.  Rewrote the test to produce a
warning message (instead of failing) when the address times out.

Also removed the special case for Windows -- this test started to
work on Windows as soon as bug 1462352 was fixed.
2006-04-08 12:12:56 +00:00
Anthony Baxter
74171bac38 backport of 43688:
Fix for failure of test_urllib2 breaking test_mimetypes (SF bug 1464978)
will backport.
2006-04-06 07:36:26 +00:00
Anthony Baxter
920430a5d3 backport:
In some environments (under screen, in a chroot) curses doesn't support
mouse events. This makes the test fail. Catch that case and don't run
the tests. Should make the debian/ubuntu buildbots that run in a chroot
work again.
2006-04-06 07:15:06 +00:00
Anthony Baxter
119dc70379 backport r43579
Deal with openbsd's different style of default /etc/hosts by forcing the fqdn
lookup to use the IP address returned by gethosbyname.
2006-04-03 16:42:41 +00:00
Neal Norwitz
d3bff37fcb Backport 43568:
Fix test_pty on OSF/1 (Tru64).  The problem is that the newline gets
converted to CR CR NL.  There may be a way to fix this with tcsetattr,
but I couldn't find it.  There was a similar problem on IRIX.

Just normalize the output and compare that.
2006-04-03 05:30:45 +00:00
Tim Peters
ac4eea445f Merge rev 43518 from trunk.
Fix stupid typo.
2006-04-01 01:35:10 +00:00
Tim Peters
a33a35e672 Merge rev 43516 from trunk.
test_timeout():  Disable this new test on all platforms.

The

    s.connect(("gmail.org", 995))

line has been timing out on all buildbot slaves for hours
now, causing the test to fail.
2006-04-01 01:31:04 +00:00
Tim Peters
1c63b55984 Merge rev 43511 from the trunk.
Another crack at bug #1460340:  make random.sample(dict)
work, this time by ugly brute force.
2006-04-01 00:41:10 +00:00
Georg Brandl
40fec61652 Make test_socket_ssl pass on Windows 2006-03-31 21:13:20 +00:00
Georg Brandl
d63d436122 Patch #1462313, bug #1443328: the pickle modules now can handle classes
that have __private names in their __slots__.
 (backport from rev. 43493)
2006-03-31 18:25:48 +00:00
Georg Brandl
c97f592c46 Patch #1380952: fix SSL objects timing out on consecutive read()s
(backport from rev. 43491)
2006-03-31 18:01:24 +00:00
Raymond Hettinger
e76415303f SF bug #1460340: random.sample can raise KeyError
Fix the hit and miss style of testing for sets and dicts.
2006-03-29 08:54:54 +00:00
Anthony Baxter
cb9051a608 after discussions with perky, reverted fix for Bug #1379994: Builtin
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.
2006-03-28 07:32:36 +00:00
Tim Peters
1d250001f5 Merge rev 43181 from the trunk.
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.
2006-03-28 07:09:33 +00:00
Martin v. Löwis
97334aebef Backport of r41530 (neal.norwitz, 2005-11-24):
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.
2006-03-27 21:38:32 +00:00
Neal Norwitz
a8de08daef Backport:
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.
2006-03-26 04:10:42 +00:00
Tim Peters
a6c0c202f5 Mechanical whitespace normalization. 2006-03-23 19:07:46 +00:00
Martin v. Löwis
73c8c2c3dd Change SystemError into SyntaxError, when a Unicode string
containing an encoding declaration is compile()d. Fixes
#1115379.
2006-03-22 13:55:50 +00:00
Tim Peters
0ca22126ce Merge revs 42842, 42844, and part of a whitespace normalization
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.
2006-03-20 02:12:05 +00:00
Neal Norwitz
5a8605ec1c Backport 43147:
Fix problem spotted by Coverity that occurs if tzinfo.tzname().replace()
returns a non-string when converting %Z.
2006-03-20 02:05:58 +00:00
Tim Peters
c612a5dbca Merge rev 43091 from the trunk.
"""
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.
2006-03-18 02:47:38 +00:00
Tim Peters
d1442b4d0e Merge rev 43081 from trunk.
Set eol-style to native.
2006-03-16 18:56:35 +00:00
Tim Peters
d82f391974 Merge rev 43079 from the trunk. This should allow test_winsound to pass
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.
2006-03-16 18:52:17 +00:00
Neal Norwitz
8a2bffc235 Backport 42932:
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.
2006-03-14 06:47:07 +00:00
Hye-Shik Chang
b0c3bdde45 Backport from trunk r42989:
Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
SS2 (single-shift 2) escape sequences correctly.
2006-03-13 10:24:31 +00:00