summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_stat.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-04-25 07:06:29 (GMT)
committerGitHub <noreply@github.com>2020-04-25 07:06:29 (GMT)
commit16994912c93e8e5db7365d48b75d67d3f70dd7b2 (patch)
tree248f177a93676406af6d6ae977bed868aa2d1a34 /Lib/test/test_stat.py
parent3c8a5b459d68b4337776ada1e04f5b33f90a2275 (diff)
downloadcpython-16994912c93e8e5db7365d48b75d67d3f70dd7b2.zip
cpython-16994912c93e8e5db7365d48b75d67d3f70dd7b2.tar.gz
cpython-16994912c93e8e5db7365d48b75d67d3f70dd7b2.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_stat.py')
-rw-r--r--Lib/test/test_stat.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py
index be01db2..d9e4ffd 100644
--- a/Lib/test/test_stat.py
+++ b/Lib/test/test_stat.py
@@ -2,8 +2,8 @@ import unittest
import os
import socket
import sys
-from test.support import (TESTFN, import_fresh_module,
- skip_unless_bind_unix_socket)
+from test.support import socket_helper
+from test.support import TESTFN, import_fresh_module
c_stat = import_fresh_module('stat', fresh=['_stat'])
py_stat = import_fresh_module('stat', blocked=['_stat'])
@@ -193,7 +193,7 @@ class TestFilemode:
self.assertS_IS("BLK", st_mode)
break
- @skip_unless_bind_unix_socket
+ @socket_helper.skip_unless_bind_unix_socket
def test_socket(self):
with socket.socket(socket.AF_UNIX) as s:
s.bind(TESTFN)