Skip to content

Commit ae319e4

Browse files
authored
pythongh-105407: Remove unused imports in tests (python#105408)
1 parent d3a0eac commit ae319e4

23 files changed

+2
-35
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import multiprocessing.managers
4949
import multiprocessing.pool
5050
import multiprocessing.queues
51-
from multiprocessing.connection import wait, AuthenticationError
51+
from multiprocessing.connection import wait
5252

5353
from multiprocessing import util
5454

Lib/test/test_asyncio/test_eager_task_factory.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22

33
import asyncio
44
import contextvars
5-
import gc
6-
import time
75
import unittest
86

9-
from types import GenericAlias
107
from unittest import mock
11-
from asyncio import base_events
128
from asyncio import tasks
139
from test.test_asyncio import utils as test_utils
14-
from test.test_asyncio.test_tasks import get_innermost_context
15-
from test import support
1610

1711
MOCK_ANY = mock.ANY
1812

Lib/test/test_calendar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import sys
99
import datetime
1010
import os
11-
import warnings
1211

1312
# From https://en.wikipedia.org/wiki/Leap_year_starting_on_Saturday
1413
result_0_02_text = """\

Lib/test/test_capi/test_misc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import os
1010
import pickle
1111
import random
12-
import subprocess
1312
import sys
1413
import textwrap
1514
import threading

Lib/test/test_clinic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed to the PSF under a contributor agreement.
44

55
from test import support, test_tools
6-
from test.support import import_helper, os_helper
6+
from test.support import os_helper
77
from unittest import TestCase
88
import collections
99
import inspect

Lib/test/test_compiler_assemble.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
import ast
31
import types
42

53
from test.support.bytecode_helper import AssemblerTestCase

Lib/test/test_configparser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pathlib
66
import textwrap
77
import unittest
8-
import warnings
98

109
from test import support
1110
from test.support import os_helper

Lib/test/test_cppext.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import subprocess
88
import sysconfig
99
from test import support
10-
from test.support import os_helper
1110

1211

1312
MS_WINDOWS = (sys.platform == 'win32')

Lib/test/test_importlib/builtin/test_finder.py

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

55
import sys
66
import unittest
7-
import warnings
87

98

109
@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')

Lib/test/test_importlib/extension/test_loader.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from warnings import catch_warnings
21
from test.test_importlib import abc, util
32

43
machinery = util.import_importlib('importlib.machinery')
@@ -10,7 +9,6 @@
109
import warnings
1110
import importlib.util
1211
import importlib
13-
from test.support.script_helper import assert_python_failure
1412

1513

1614
class LoaderTests:

0 commit comments

Comments
 (0)