Skip to content

Commit

Permalink
bpo-40443: Remove unused imports in tests (GH-19804)
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner authored Apr 30, 2020
1 parent 57572b1 commit b1e11c3
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion Lib/distutils/tests/test_build_clib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion Lib/distutils/tests/test_config_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/tests/test_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 1 addition & 2 deletions Lib/distutils/tests/test_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import operator
import struct
import sys
import warnings

import array
from array import _array_reconstructor as array_reconstructor
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncio/test_base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import concurrent.futures
import errno
import math
import os
import socket
import sys
import threading
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncio/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_asyncio/test_sslproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging
import socket
import sys
from test import support
import unittest
import weakref
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_call.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import datetime
import unittest
from test.support import cpython_only
try:
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
import threading
import unittest
import weakref
import opcode
try:
import ctypes
except ImportError:
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_compileall.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import time
import unittest
import io
import errno

from unittest import mock, skipUnless
try:
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_flufl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import __future__
import unittest
import sys
from test import support


Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_fractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
import ast
import types
import decimal
import sys
import unittest
from test import support

a_global = 'global variable'

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import array
from binascii import unhexlify
import functools
import hashlib
import importlib
import itertools
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_ipaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import unittest
import re
import contextlib
import functools
import operator
import pickle
import ipaddress
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import queue
import random
import re
import signal
import socket
import struct
import sys
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_named_expressions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import unittest

GLOBAL_VAR = None
Expand Down

0 comments on commit b1e11c3

Please sign in to comment.