mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -5,6 +5,7 @@ import unittest
|
|||
import unittest.mock
|
||||
from test import support
|
||||
from test.support import socket_helper
|
||||
from test.support import threading_helper
|
||||
import socket
|
||||
import select
|
||||
import time
|
||||
|
@ -4429,7 +4430,7 @@ class TestPostHandshakeAuth(unittest.TestCase):
|
|||
|
||||
# Ignore expected SSLError in ConnectionHandler of ThreadedEchoServer
|
||||
# (it is only raised sometimes on Windows)
|
||||
with support.catch_threading_exception() as cm:
|
||||
with threading_helper.catch_threading_exception() as cm:
|
||||
server = ThreadedEchoServer(context=server_context, chatty=False)
|
||||
with server:
|
||||
with client_context.wrap_socket(socket.socket(),
|
||||
|
@ -4750,11 +4751,11 @@ def test_main(verbose=False):
|
|||
if support.is_resource_enabled('network'):
|
||||
tests.append(NetworkedTests)
|
||||
|
||||
thread_info = support.threading_setup()
|
||||
thread_info = threading_helper.threading_setup()
|
||||
try:
|
||||
support.run_unittest(*tests)
|
||||
finally:
|
||||
support.threading_cleanup(*thread_info)
|
||||
threading_helper.threading_cleanup(*thread_info)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue