diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-04-29 07:36:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 07:36:20 (GMT) |
commit | bfb1cf44658934cbcd9707fb717d6770c78fbeb3 (patch) | |
tree | a9dcce79d42f76509491b3d8b165f6737143cbc5 /Lib/test/test_timeout.py | |
parent | bb4a585d903e7fe0a46ded8c2ee3f47435ad6a66 (diff) | |
download | cpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.zip cpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.tar.gz cpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.tar.bz2 |
bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)
Diffstat (limited to 'Lib/test/test_timeout.py')
-rw-r--r-- | Lib/test/test_timeout.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py index c0952c7..ac803f5 100644 --- a/Lib/test/test_timeout.py +++ b/Lib/test/test_timeout.py @@ -20,7 +20,7 @@ def resolve_address(host, port): We must perform name resolution before timeout tests, otherwise it will be performed by connect(). """ - with support.transient_internet(host): + with socket_helper.transient_internet(host): return socket.getaddrinfo(host, port, socket.AF_INET, socket.SOCK_STREAM)[0][4] @@ -230,12 +230,12 @@ class TCPTimeoutTestCase(TimeoutTestCase): # All that hard work just to test if connect times out in 0.001s ;-) self.addr_remote = blackhole - with support.transient_internet(self.addr_remote[0]): + with socket_helper.transient_internet(self.addr_remote[0]): self._sock_operation(1, 0.001, 'connect', self.addr_remote) def testRecvTimeout(self): # Test recv() timeout - with support.transient_internet(self.addr_remote[0]): + with socket_helper.transient_internet(self.addr_remote[0]): self.sock.connect(self.addr_remote) self._sock_operation(1, 1.5, 'recv', 1024) |