File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -1222,8 +1222,8 @@ def refcount_test(test):
1222
1222
1223
1223
def requires_limited_api (test ):
1224
1224
try :
1225
- import _testcapi
1226
- import _testlimitedcapi
1225
+ import _testcapi # noqa: F401
1226
+ import _testlimitedcapi # noqa: F401
1227
1227
except ImportError :
1228
1228
return unittest .skip ('needs _testcapi and _testlimitedcapi modules' )(test )
1229
1229
return test
@@ -2300,7 +2300,7 @@ def clear_ignored_deprecations(*tokens: object) -> None:
2300
2300
def requires_venv_with_pip ():
2301
2301
# ensurepip requires zlib to open ZIP archives (.whl binary wheel packages)
2302
2302
try :
2303
- import zlib
2303
+ import zlib # noqa: F401
2304
2304
except ImportError :
2305
2305
return unittest .skipIf (True , "venv: ensurepip requires zlib" )
2306
2306
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ def test_all(self):
104
104
# In case _socket fails to build, make this test fail more gracefully
105
105
# than an AttributeError somewhere deep in concurrent.futures, email
106
106
# or unittest.
107
- import _socket
107
+ import _socket # noqa: F401
108
108
109
109
ignored = []
110
110
failed_imports = []
Original file line number Diff line number Diff line change @@ -1287,7 +1287,7 @@ def test_getfullargspec_builtin_func_no_signature(self):
1287
1287
(dict .__class_getitem__ , meth_type_o ),
1288
1288
]
1289
1289
try :
1290
- import _stat
1290
+ import _stat # noqa: F401
1291
1291
except ImportError :
1292
1292
# if the _stat extension is not available, stat.S_IMODE() is
1293
1293
# implemented in Python, not in C
@@ -3188,7 +3188,7 @@ def test_signature_on_builtins_no_signature(self):
3188
3188
(dict .__class_getitem__ , meth_o ),
3189
3189
]
3190
3190
try :
3191
- import _stat
3191
+ import _stat # noqa: F401
3192
3192
except ImportError :
3193
3193
# if the _stat extension is not available, stat.S_IMODE() is
3194
3194
# implemented in Python, not in C
Original file line number Diff line number Diff line change 14
14
15
15
# some platforms lack working multiprocessing
16
16
try :
17
- import _multiprocessing
17
+ import _multiprocessing # noqa: F401
18
18
except ImportError :
19
19
multiprocessing = None
20
20
else :
@@ -1229,7 +1229,7 @@ def test_pickling(self):
1229
1229
newpat = pickle .loads (pickled )
1230
1230
self .assertEqual (newpat , oldpat )
1231
1231
# current pickle expects the _compile() reconstructor in re module
1232
- from re import _compile
1232
+ from re import _compile # noqa: F401
1233
1233
1234
1234
def test_copying (self ):
1235
1235
import copy
Original file line number Diff line number Diff line change @@ -1747,7 +1747,7 @@ def test_other_bug(self):
1747
1747
@support .cpython_only
1748
1748
def test_uncollectable (self ):
1749
1749
try :
1750
- import _testcapi
1750
+ import _testcapi # noqa: F401
1751
1751
except ImportError :
1752
1752
raise unittest .SkipTest ("requires _testcapi" )
1753
1753
code = textwrap .dedent (r"""
@@ -2133,7 +2133,7 @@ def test_unload_tests(self):
2133
2133
def check_add_python_opts (self , option ):
2134
2134
# --fast-ci and --slow-ci add "-u -W default -bb -E" options to Python
2135
2135
try :
2136
- import _testinternalcapi
2136
+ import _testinternalcapi # noqa: F401
2137
2137
except ImportError :
2138
2138
raise unittest .SkipTest ("requires _testinternalcapi" )
2139
2139
code = textwrap .dedent (r"""
@@ -2199,7 +2199,7 @@ def test_add_python_opts(self):
2199
2199
'raising SIGSEGV on Android is unreliable' )
2200
2200
def test_worker_output_on_failure (self ):
2201
2201
try :
2202
- from faulthandler import _sigsegv
2202
+ from faulthandler import _sigsegv # noqa: F401
2203
2203
except ImportError :
2204
2204
self .skipTest ("need faulthandler._sigsegv" )
2205
2205
You can’t perform that action at this time.
0 commit comments