Commit Graph

17 Commits

Author SHA1 Message Date
Neal Norwitz 482043aed6 Reap children before the test starts so hopefully SocketServer
won't find any old children left around which causes an exception
in collect_children() and the test to fail.
2007-08-26 06:29:57 +00:00
Guido van Rossum b1bb01e2f6 Fix a race condition in this test -- instead of assuming that it will take
the test server thread at most 0.5 seconds to get ready, use an event
variable.
2007-04-04 17:43:02 +00:00
Collin Winter 3351aa7dd5 Convert an assert to a raise so it works even in the presence of -O. 2007-03-10 14:33:32 +00:00
Collin Winter 22c42ba88c Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
2007-03-10 02:51:26 +00:00
Neal Norwitz b476fdf7c3 Fix the test for SocketServer so it should pass on cygwin and not fail
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
2006-08-15 04:58:28 +00:00
Neal Norwitz b15ac3169d Add new utility function, reap_children(), to test_support. This should
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?).  This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children.  The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either.  Time will tell.
2006-06-29 04:10:08 +00:00
Neal Norwitz 909eb12c95 Fix the socket tests so they can be run concurrently. Backport candidate 2006-06-12 02:13:21 +00:00
Andrew MacIntyre daedf21852 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.
2004-04-11 12:03:57 +00:00
Walter Dörwald 70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Andrew MacIntyre c6fff897d7 EMX fork() emulation not good enough to cope with test_socketserver 2003-01-02 12:49:00 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Guido van Rossum 9bd1401bbb Use sendall() in the stream test instead of send(). 2001-10-29 07:18:02 +00:00
Tim Peters a86f0c17a1 Make test_socketserver require the network resource.
Add it back to the list of tests we expect to skip on Windows.
2001-09-18 02:18:57 +00:00
Tim Peters a9f6f22f72 Rework akin to test_threaded_import, so that this can run under regrtest.
Also raise TestSkipped (intead of appearing to fail) if the import lock
is held.
2001-09-17 23:56:20 +00:00
Guido van Rossum 0960015056 Should raise TestSkipped, not ImportError, when deciding to skip the
test.
2001-07-13 17:27:57 +00:00
Guido van Rossum 05be1a0fd6 Ported to Windows:
- Set the host to "localhost" instead of "".

- Skip the AF_UNIX tests when socket.AF_UNIX is not defined.
2001-07-10 15:46:34 +00:00
Guido van Rossum 39f1b3656e A test suite for SocketServer.py that exposes the various bugs just
fixed.  Regrettably, this must be run manually -- somehow the I/O
redirection of the regression test breaks the test.  When run under
the regression test, this raises ImportError with a warning to that
effect.

Bugfix candidate!
2001-07-10 11:52:38 +00:00