mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
This commit is contained in:
parent
7d80b35af1
commit
e80697d687
46 changed files with 483 additions and 428 deletions
|
@ -14,8 +14,9 @@ import unittest
|
|||
import socketserver
|
||||
|
||||
import test.support
|
||||
from test.support import reap_children, reap_threads, verbose
|
||||
from test.support import reap_children, verbose
|
||||
from test.support import socket_helper
|
||||
from test.support import threading_helper
|
||||
|
||||
|
||||
test.support.requires("network")
|
||||
|
@ -120,7 +121,7 @@ class SocketServerTest(unittest.TestCase):
|
|||
self.assertEqual(server.server_address, server.socket.getsockname())
|
||||
return server
|
||||
|
||||
@reap_threads
|
||||
@threading_helper.reap_threads
|
||||
def run_server(self, svrcls, hdlrbase, testfunc):
|
||||
server = self.make_server(self.pickaddr(svrcls.address_family),
|
||||
svrcls, hdlrbase)
|
||||
|
@ -249,7 +250,7 @@ class SocketServerTest(unittest.TestCase):
|
|||
socketserver.DatagramRequestHandler,
|
||||
self.dgram_examine)
|
||||
|
||||
@reap_threads
|
||||
@threading_helper.reap_threads
|
||||
def test_shutdown(self):
|
||||
# Issue #2302: shutdown() should always succeed in making an
|
||||
# other thread leave serve_forever().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue