summaryrefslogtreecommitdiff
path: root/Lib/test/test_site.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-04-29 10:36:20 +0300
committerGitHub <noreply@github.com>2020-04-29 10:36:20 +0300
commitbfb1cf44658934cbcd9707fb717d6770c78fbeb3 (patch)
treea9dcce79d42f76509491b3d8b165f6737143cbc5 /Lib/test/test_site.py
parentbb4a585d903e7fe0a46ded8c2ee3f47435ad6a66 (diff)
downloadcpython-git-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.tar.gz
bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r--Lib/test/test_site.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 12e357cd9b..957e7a41d5 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -7,6 +7,7 @@ executing have not been removed.
import unittest
import test.support
from test import support
+from test.support import socket_helper
from test.support import (captured_stderr, TESTFN, EnvironmentVarGuard,
change_cwd)
import builtins
@@ -509,7 +510,7 @@ class ImportSideEffectTests(unittest.TestCase):
url = license._Printer__data.split()[1]
req = urllib.request.Request(url, method='HEAD')
try:
- with test.support.transient_internet(url):
+ with socket_helper.transient_internet(url):
with urllib.request.urlopen(req) as data:
code = data.getcode()
except urllib.error.HTTPError as e: