mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-40275: Avoid importing socket in test.support (GH-19603)
* Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
This commit is contained in:
parent
3c8a5b459d
commit
16994912c9
37 changed files with 472 additions and 429 deletions
|
@ -30,6 +30,7 @@ import unittest
|
|||
import uuid
|
||||
import warnings
|
||||
from test import support
|
||||
from test.support import socket_helper
|
||||
from platform import win32_is_iot
|
||||
|
||||
try:
|
||||
|
@ -3171,7 +3172,7 @@ class TestSendfile(unittest.TestCase):
|
|||
support.unlink(support.TESTFN)
|
||||
|
||||
def setUp(self):
|
||||
self.server = SendfileTestServer((support.HOST, 0))
|
||||
self.server = SendfileTestServer((socket_helper.HOST, 0))
|
||||
self.server.start()
|
||||
self.client = socket.socket()
|
||||
self.client.connect((self.server.host, self.server.port))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue