Issue25931: fix tests broken by the conditional define of socketserver.Forking*
This commit is contained in:
parent
aea1650389
commit
a945969d71
|
@ -44,7 +44,7 @@ def receive(sock, n, timeout=20):
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("timed out on %r" % (sock,))
|
raise RuntimeError("timed out on %r" % (sock,))
|
||||||
|
|
||||||
if HAVE_UNIX_SOCKETS:
|
if HAVE_UNIX_SOCKETS and HAVE_FORKING:
|
||||||
class ForkingUnixStreamServer(socketserver.ForkingMixIn,
|
class ForkingUnixStreamServer(socketserver.ForkingMixIn,
|
||||||
socketserver.UnixStreamServer):
|
socketserver.UnixStreamServer):
|
||||||
pass
|
pass
|
||||||
|
@ -368,11 +368,12 @@ class ThreadingErrorTestServer(socketserver.ThreadingMixIn,
|
||||||
self.done.wait()
|
self.done.wait()
|
||||||
|
|
||||||
|
|
||||||
class ForkingErrorTestServer(socketserver.ForkingMixIn, BaseErrorTestServer):
|
if HAVE_FORKING:
|
||||||
def wait_done(self):
|
class ForkingErrorTestServer(socketserver.ForkingMixIn, BaseErrorTestServer):
|
||||||
[child] = self.active_children
|
def wait_done(self):
|
||||||
os.waitpid(child, 0)
|
[child] = self.active_children
|
||||||
self.active_children.clear()
|
os.waitpid(child, 0)
|
||||||
|
self.active_children.clear()
|
||||||
|
|
||||||
|
|
||||||
class MiscTestCase(unittest.TestCase):
|
class MiscTestCase(unittest.TestCase):
|
||||||
|
|
Loading…
Reference in New Issue