bpo-40443: Remove unused imports in tests (GH-19804)

This commit is contained in:
Victor Stinner 2020-04-30 02:21:30 +02:00 committed by GitHub
parent 57572b103e
commit b1e11c31c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 2 additions and 20 deletions

View 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,

View 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)

View 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 (

View 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

View 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

View File

@ -3,7 +3,6 @@
import concurrent.futures
import errno
import math
import os
import socket
import sys
import threading

View 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

View File

@ -2,7 +2,6 @@
import logging
import socket
import sys
from test import support
import unittest
import weakref

View File

@ -1,4 +1,3 @@
import datetime
import unittest
from test.support import cpython_only
try:

View File

@ -130,7 +130,6 @@ import sys
import threading
import unittest
import weakref
import opcode
try:
import ctypes
except ImportError:

View File

@ -11,7 +11,6 @@ import tempfile
import time
import unittest
import io
import errno
from unittest import mock, skipUnless
try:

View File

@ -1,6 +1,5 @@
import __future__
import unittest
import sys
from test import support

View 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

View File

@ -10,9 +10,7 @@
import ast
import types
import decimal
import sys
import unittest
from test import support
a_global = 'global variable'

View File

@ -8,7 +8,6 @@
import array
from binascii import unhexlify
import functools
import hashlib
import importlib
import itertools

View File

@ -7,7 +7,6 @@
import unittest
import re
import contextlib
import functools
import operator
import pickle
import ipaddress

View File

@ -36,7 +36,6 @@ import os
import queue
import random
import re
import signal
import socket
import struct
import sys

View File

@ -1,4 +1,3 @@
import os
import unittest
GLOBAL_VAR = None