diff --git a/Lib/distutils/tests/test_build_clib.py b/Lib/distutils/tests/test_build_clib.py index 85d09906f228d4..abd8313770ef7a 100644 --- a/Lib/distutils/tests/test_build_clib.py +++ b/Lib/distutils/tests/test_build_clib.py @@ -8,7 +8,6 @@ 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, diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py index 8bd2c94237846a..9aeab07b468361 100644 --- a/Lib/distutils/tests/test_config_cmd.py +++ b/Lib/distutils/tests/test_config_cmd.py @@ -39,7 +39,6 @@ def test_dump_file(self): @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) diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py index cc34725a99efa4..60956dadef2346 100644 --- a/Lib/distutils/tests/test_dist.py +++ b/Lib/distutils/tests/test_dist.py @@ -8,7 +8,7 @@ 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 ( diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py index 73b0f5cb7324c0..cf1faad5f4dd5d 100644 --- a/Lib/distutils/tests/test_spawn.py +++ b/Lib/distutils/tests/test_spawn.py @@ -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 diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index 5f612fba8a497c..f731b70415e7f6 100644 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -10,7 +10,6 @@ import operator import struct import sys -import warnings import array from array import _array_reconstructor as array_reconstructor diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index 4adcbf46cc9eb9..533d5cc7f50382 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -3,7 +3,6 @@ import concurrent.futures import errno import math -import os import socket import sys import threading diff --git a/Lib/test/test_asyncio/test_server.py b/Lib/test/test_asyncio/test_server.py index 006ead29562cf6..2de4dcad17c8ed 100644 --- a/Lib/test/test_asyncio/test_server.py +++ b/Lib/test/test_asyncio/test_server.py @@ -3,7 +3,6 @@ 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 diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py index c716eacfaf1c00..948820c82f3bfb 100644 --- a/Lib/test/test_asyncio/test_sslproto.py +++ b/Lib/test/test_asyncio/test_sslproto.py @@ -2,7 +2,6 @@ import logging import socket -import sys from test import support import unittest import weakref diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py index b3077ad1d1cb82..451a7170c304de 100644 --- a/Lib/test/test_call.py +++ b/Lib/test/test_call.py @@ -1,4 +1,3 @@ -import datetime import unittest from test.support import cpython_only try: diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py index 7bb824ea31daca..ac3dde745603db 100644 --- a/Lib/test/test_code.py +++ b/Lib/test/test_code.py @@ -130,7 +130,6 @@ import threading import unittest import weakref -import opcode try: import ctypes except ImportError: diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index cb59fd71b38254..72678945089f28 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -11,7 +11,6 @@ import time import unittest import io -import errno from unittest import mock, skipUnless try: diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py index b71442804c72ba..22285859a92bb1 100644 --- a/Lib/test/test_flufl.py +++ b/Lib/test/test_flufl.py @@ -1,6 +1,5 @@ import __future__ import unittest -import sys from test import support diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py index c748533c791298..0845f7921c39ec 100644 --- a/Lib/test/test_fractions.py +++ b/Lib/test/test_fractions.py @@ -9,7 +9,6 @@ import functools import sys import unittest -import warnings from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 4c240f34a35430..fe465b7e1d43dc 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -10,9 +10,7 @@ import ast import types import decimal -import sys import unittest -from test import support a_global = 'global variable' diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 33b687e0b40864..20dd7a4d413599 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -8,7 +8,6 @@ import array from binascii import unhexlify -import functools import hashlib import importlib import itertools diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py index bbb3fc89da6533..6d5814c9774a0f 100644 --- a/Lib/test/test_ipaddress.py +++ b/Lib/test/test_ipaddress.py @@ -7,7 +7,6 @@ import unittest import re import contextlib -import functools import operator import pickle import ipaddress diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index e1d0eb8145fe23..4cc45f71071150 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -36,7 +36,6 @@ import queue import random import re -import signal import socket import struct import sys diff --git a/Lib/test/test_named_expressions.py b/Lib/test/test_named_expressions.py index 3ae557f78d273a..c813830ce6d3cf 100644 --- a/Lib/test/test_named_expressions.py +++ b/Lib/test/test_named_expressions.py @@ -1,4 +1,3 @@ -import os import unittest GLOBAL_VAR = None