aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-30 02:21:30 +0200
committerGitHub <noreply@github.com>2020-04-30 02:21:30 +0200
commitea19518aa139d623a4fad7d01159674ee43b9f15 (patch)
tree7db3e2442028eb18ff3e803d2a8b087c86830390
parent74e9f56dc7857cee680727406517c2c086511e12 (diff)
downloadexternal_python_setuptools-ea19518aa139d623a4fad7d01159674ee43b9f15.tar.gz
external_python_setuptools-ea19518aa139d623a4fad7d01159674ee43b9f15.tar.bz2
external_python_setuptools-ea19518aa139d623a4fad7d01159674ee43b9f15.zip
bpo-40443: Remove unused imports in tests (GH-19804)
-rw-r--r--tests/test_build_clib.py1
-rw-r--r--tests/test_config_cmd.py1
-rw-r--r--tests/test_dist.py2
-rw-r--r--tests/test_spawn.py3
4 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_build_clib.py b/tests/test_build_clib.py
index 85d09906..abd83137 100644
--- a/tests/test_build_clib.py
+++ b/tests/test_build_clib.py
@@ -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,
diff --git a/tests/test_config_cmd.py b/tests/test_config_cmd.py
index 8bd2c942..9aeab07b 100644
--- a/tests/test_config_cmd.py
+++ b/tests/test_config_cmd.py
@@ -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)
diff --git a/tests/test_dist.py b/tests/test_dist.py
index cc34725a..60956dad 100644
--- a/tests/test_dist.py
+++ b/tests/test_dist.py
@@ -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 (
diff --git a/tests/test_spawn.py b/tests/test_spawn.py
index 73b0f5cb..cf1faad5 100644
--- a/tests/test_spawn.py
+++ b/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