Skip to content

Commit b1e11c3

Browse files
authored
bpo-40443: Remove unused imports in tests (GH-19804)
1 parent 57572b1 commit b1e11c3

18 files changed

+2
-20
lines changed

Lib/distutils/tests/test_build_clib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from distutils.command.build_clib import build_clib
99
from distutils.errors import DistutilsSetupError
1010
from distutils.tests import support
11-
from distutils.spawn import find_executable
1211

1312
class BuildCLibTestCase(support.TempdirManager,
1413
support.LoggingSilencer,

Lib/distutils/tests/test_config_cmd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def test_dump_file(self):
3939

4040
@unittest.skipIf(sys.platform == 'win32', "can't test on Windows")
4141
def test_search_cpp(self):
42-
import shutil
4342
cmd = missing_compiler_executable(['preprocessor'])
4443
if cmd is not None:
4544
self.skipTest('The %r command is not found' % cmd)

Lib/distutils/tests/test_dist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from unittest import mock
1010

11-
from distutils.dist import Distribution, fix_help_options, DistributionMetadata
11+
from distutils.dist import Distribution, fix_help_options
1212
from distutils.cmd import Command
1313

1414
from test.support import (

Lib/distutils/tests/test_spawn.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import os
33
import stat
44
import sys
5-
import unittest
6-
from unittest import mock
5+
import unittest.mock
76
from test.support import run_unittest, unix_shell
87
from test import support as test_support
98

Lib/test/test_array.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import operator
1111
import struct
1212
import sys
13-
import warnings
1413

1514
import array
1615
from array import _array_reconstructor as array_reconstructor

Lib/test/test_asyncio/test_base_events.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import concurrent.futures
44
import errno
55
import math
6-
import os
76
import socket
87
import sys
98
import threading

Lib/test/test_asyncio/test_server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import threading
44
import unittest
55

6-
from test import support
76
from test.support import socket_helper
87
from test.test_asyncio import utils as test_utils
98
from test.test_asyncio import functional as func_tests

Lib/test/test_asyncio/test_sslproto.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import logging
44
import socket
5-
import sys
65
from test import support
76
import unittest
87
import weakref

Lib/test/test_call.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import datetime
21
import unittest
32
from test.support import cpython_only
43
try:

Lib/test/test_code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130
import threading
131131
import unittest
132132
import weakref
133-
import opcode
134133
try:
135134
import ctypes
136135
except ImportError:

0 commit comments

Comments
 (0)