]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40443: Remove unused imports in tests (GH-19804)
authorVictor Stinner <vstinner@python.org>
Thu, 30 Apr 2020 00:21:30 +0000 (02:21 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Apr 2020 00:21:30 +0000 (02:21 +0200)
18 files changed:
Lib/distutils/tests/test_build_clib.py
Lib/distutils/tests/test_config_cmd.py
Lib/distutils/tests/test_dist.py
Lib/distutils/tests/test_spawn.py
Lib/test/test_array.py
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_server.py
Lib/test/test_asyncio/test_sslproto.py
Lib/test/test_call.py
Lib/test/test_code.py
Lib/test/test_compileall.py
Lib/test/test_flufl.py
Lib/test/test_fractions.py
Lib/test/test_fstring.py
Lib/test/test_hashlib.py
Lib/test/test_ipaddress.py
Lib/test/test_logging.py
Lib/test/test_named_expressions.py

index 85d09906f228d4025b9bc051e9e0be94c81cda38..abd8313770ef7a449ff37d6163b9950d67b8274a 100644 (file)
@@ -8,7 +8,6 @@ from test.support import run_unittest, missing_compiler_executable
 from distutils.command.build_clib import build_clib
 from distutils.errors import DistutilsSetupError
 from distutils.tests import support
-from distutils.spawn import find_executable
 
 class BuildCLibTestCase(support.TempdirManager,
                         support.LoggingSilencer,
index 8bd2c94237846acb1878d617a93b5d3fa92565d1..9aeab07b4683610a118d4e4d5354f1ce5a798865 100644 (file)
@@ -39,7 +39,6 @@ class ConfigTestCase(support.LoggingSilencer,
 
     @unittest.skipIf(sys.platform == 'win32', "can't test on Windows")
     def test_search_cpp(self):
-        import shutil
         cmd = missing_compiler_executable(['preprocessor'])
         if cmd is not None:
             self.skipTest('The %r command is not found' % cmd)
index cc34725a99efa423db4a5ab38507b66adcac143b..60956dadef2346ac36154d5f80f8450ae2ec09cd 100644 (file)
@@ -8,7 +8,7 @@ import textwrap
 
 from unittest import mock
 
-from distutils.dist import Distribution, fix_help_options, DistributionMetadata
+from distutils.dist import Distribution, fix_help_options
 from distutils.cmd import Command
 
 from test.support import (
index 73b0f5cb7324c016c87432a52f38e78c81981c83..cf1faad5f4dd5d2ecd1f50e38def83a803f1929c 100644 (file)
@@ -2,8 +2,7 @@
 import os
 import stat
 import sys
-import unittest
-from unittest import mock
+import unittest.mock
 from test.support import run_unittest, unix_shell
 from test import support as test_support
 
index 5f612fba8a497c2d76d4b5d49dadf7747bf12c40..f731b70415e7f66bf51834ee97e333db6e5dc6c6 100644 (file)
@@ -10,7 +10,6 @@ import pickle
 import operator
 import struct
 import sys
-import warnings
 
 import array
 from array import _array_reconstructor as array_reconstructor
index 4adcbf46cc9eb95c0a45c10c58a5a66a0e1fa630..533d5cc7f503827b970dbc8412b0431b127f2c19 100644 (file)
@@ -3,7 +3,6 @@
 import concurrent.futures
 import errno
 import math
-import os
 import socket
 import sys
 import threading
index 006ead29562cf6ffc88124906ac19eb36a1a93c2..2de4dcad17c8ed51895773790837dd6e2db8f9f9 100644 (file)
@@ -3,7 +3,6 @@ import time
 import threading
 import unittest
 
-from test import support
 from test.support import socket_helper
 from test.test_asyncio import utils as test_utils
 from test.test_asyncio import functional as func_tests
index c716eacfaf1c000fd643f701a99def585d402c19..948820c82f3bfb6c27dfff2814c66776c69422cd 100644 (file)
@@ -2,7 +2,6 @@
 
 import logging
 import socket
-import sys
 from test import support
 import unittest
 import weakref
index b3077ad1d1cb82c619b648c1e5d3b69898d0172f..451a7170c304dec91f45983b51991051453e2dbc 100644 (file)
@@ -1,4 +1,3 @@
-import datetime
 import unittest
 from test.support import cpython_only
 try:
index 7bb824ea31daca7c168c84cedeb1bc312a668ae8..ac3dde745603db733501fcc1ad27e0b44e28d427 100644 (file)
@@ -130,7 +130,6 @@ import sys
 import threading
 import unittest
 import weakref
-import opcode
 try:
     import ctypes
 except ImportError:
index cb59fd71b38254f172dd41b63b82b8da4195b135..72678945089f28857ed5b3e2e94fa03367645074 100644 (file)
@@ -11,7 +11,6 @@ import tempfile
 import time
 import unittest
 import io
-import errno
 
 from unittest import mock, skipUnless
 try:
index b71442804c72baa5f96de3317427e9e0fc2ff4b2..22285859a92bb1eaec2da376a31e16d7ac706514 100644 (file)
@@ -1,6 +1,5 @@
 import __future__
 import unittest
-import sys
 from test import support
 
 
index c748533c7912981f5e997690de49ac37d7327149..0845f7921c39ec7f7c0f090e0f471668b75388f6 100644 (file)
@@ -9,7 +9,6 @@ import fractions
 import functools
 import sys
 import unittest
-import warnings
 from copy import copy, deepcopy
 from pickle import dumps, loads
 F = fractions.Fraction
index 4c240f34a3543043a36bc816ba9696955eb8ec6b..fe465b7e1d43dc7bb5ae264b8b7929f4ab5d6c03 100644 (file)
@@ -10,9 +10,7 @@
 import ast
 import types
 import decimal
-import sys
 import unittest
-from test import support
 
 a_global = 'global variable'
 
index 31d8e5567639c84b60d12bf3d92cbf1f31b4c5f4..f9fe7e37920a38aa80abf8978efe47f074d54bc8 100644 (file)
@@ -8,7 +8,6 @@
 
 import array
 from binascii import unhexlify
-import functools
 import hashlib
 import importlib
 import itertools
index bbb3fc89da653355a7d607eda2dc77cd1b707798..6d5814c9774a0f75cff666114656bf7be3faa772 100644 (file)
@@ -7,7 +7,6 @@
 import unittest
 import re
 import contextlib
-import functools
 import operator
 import pickle
 import ipaddress
index e1d0eb8145fe230142acff052e0a16782a20ec25..4cc45f71071150c9d5d829427ccb77ff27383a5d 100644 (file)
@@ -36,7 +36,6 @@ import os
 import queue
 import random
 import re
-import signal
 import socket
 import struct
 import sys
index 3ae557f78d273a31ab03dffc05d53a8e4f24eee4..c813830ce6d3cf48e59b6634990de0e496263812 100644 (file)
@@ -1,4 +1,3 @@
-import os
 import unittest
 
 GLOBAL_VAR = None