Skip to content

Commit 73ab9e2

Browse files
authored
gh-131152: Remove unused imports from tests (#131153)
1 parent 0c6c52f commit 73ab9e2

22 files changed

+10
-34
lines changed

Lib/test/libregrtest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .findtests import findtests, split_test_packages, list_cases
1616
from .logger import Logger
1717
from .pgo import setup_pgo_tests
18-
from .result import State, TestResult
18+
from .result import TestResult
1919
from .results import TestResults, EXITCODE_INTERRUPTED
2020
from .runtests import RunTests, HuntRefleak
2121
from .setup import setup_process, setup_test_dir

Lib/test/libregrtest/parallel_case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Run a test case multiple times in parallel threads."""
22

33
import copy
4-
import functools
54
import threading
65
import unittest
76

Lib/test/libregrtest/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import random
88
import re
99
import shlex
10-
import signal
1110
import subprocess
1211
import sys
1312
import sysconfig

Lib/test/support/venv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import sys
77
import sysconfig
88
import tempfile
9-
import unittest
109
import venv
1110

1211

Lib/test/test_asyncio/test_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import unittest
2323
from unittest import mock
2424
import weakref
25-
import warnings
2625
if sys.platform not in ('win32', 'vxworks'):
2726
import tty
2827

@@ -36,7 +35,6 @@
3635
from test.support import socket_helper
3736
from test.support import threading_helper
3837
from test.support import ALWAYS_EQ, LARGEST, SMALLEST
39-
from test.support import warnings_helper
4038

4139
def tearDownModule():
4240
asyncio._set_event_loop_policy(None)

Lib/test/test_asyncio/test_streams.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
"""Tests for streams.py."""
22

33
import gc
4-
import os
54
import queue
65
import pickle
76
import socket
8-
import sys
97
import threading
108
import unittest
119
from unittest import mock
12-
import warnings
1310
try:
1411
import ssl
1512
except ImportError:
1613
ssl = None
1714

1815
import asyncio
1916
from test.test_asyncio import utils as test_utils
20-
from test.support import requires_subprocess, socket_helper
17+
from test.support import socket_helper
2118

2219

2320
def tearDownModule():

Lib/test/test_asyncio/test_unix_events.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
import socket
1111
import stat
1212
import sys
13-
import threading
1413
import time
1514
import unittest
1615
from unittest import mock
17-
import warnings
1816

1917
from test import support
2018
from test.support import os_helper
@@ -27,7 +25,6 @@
2725

2826

2927
import asyncio
30-
from asyncio import log
3128
from asyncio import unix_events
3229
from test.test_asyncio import utils as test_utils
3330

Lib/test/test_asyncio/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import threading
1515
import unittest
1616
import weakref
17-
import warnings
1817
from ast import literal_eval
1918
from unittest import mock
2019

Lib/test/test_builtin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import random
1717
import re
1818
import sys
19-
import textwrap
2019
import traceback
2120
import types
2221
import typing

Lib/test/test_bytes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import copy
1212
import functools
1313
import pickle
14-
import sysconfig
1514
import tempfile
1615
import textwrap
1716
import threading

0 commit comments

Comments
 (0)