Skip to content

Commit 90d0cfb

Browse files
srinivasreddyserhiy-storchaka
authored andcommitted
bpo-35202: Remove unused imports in tests. (GH-10561)
1 parent 4edeaea commit 90d0cfb

17 files changed

+1
-18
lines changed

Lib/test/test_aifc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import sys
88
import struct
99
import aifc
10-
import warnings
11-
1210

1311
class AifcTest(audiotests.AudioWriteTests,
1412
audiotests.AudioTestsWithSourceFile):

Lib/test/test_asyncio/test_selector_events.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Tests for selector_events.py"""
22

3-
import errno
43
import selectors
54
import socket
65
import unittest

Lib/test/test_coroutines.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import copy
33
import inspect
44
import pickle
5-
import re
65
import sys
76
import types
87
import unittest

Lib/test/test_frozen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import sys
1414
import unittest
1515
from test.support import captured_stdout
16-
from importlib import util
1716

1817

1918
class TestFrozen(unittest.TestCase):

Lib/test/test_future.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Test various flavors of legal and illegal future statements
22

3-
from functools import partial
43
import unittest
54
from test import support
65
from textwrap import dedent

Lib/test/test_gdb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# The code for testing gdb was adapted from similar work in Unladen Swallow's
44
# Lib/test/test_jit_gdb.py
55

6-
import locale
76
import os
87
import platform
98
import re

Lib/test/test_importlib/test_locks.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 threading
7-
import unittest
87
import weakref
98

109
from test import support

Lib/test/test_minidom.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import copy
44
import pickle
55
import io
6-
import contextlib
76
from test.support import findfile
87
import unittest
98

Lib/test/test_netrc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import netrc, os, unittest, sys, tempfile, textwrap
2-
from unittest import mock
32
from test import support
43

54

Lib/test/test_platform.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from unittest import mock
21
import os
32
import platform
43
import subprocess

Lib/test/test_resource.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import contextlib
22
import sys
3-
import os
43
import unittest
54
from test import support
65
import time

Lib/test/test_sax.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl
1818
from io import BytesIO, StringIO
1919
import codecs
20-
import gc
2120
import os.path
2221
import shutil
2322
from urllib.error import URLError

Lib/test/test_ssl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import asyncore
1818
import weakref
1919
import platform
20-
import functools
2120
import sysconfig
2221
try:
2322
import ctypes

Lib/test/test_time.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import time
1010
import threading
1111
import unittest
12-
import warnings
1312
try:
1413
import _testcapi
1514
except ImportError:

Lib/test/test_traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def test_encoded_file(self):
110110
# Test that tracebacks are correctly printed for encoded source files:
111111
# - correct line number (Issue2384)
112112
# - respect file encoding (Issue3975)
113-
import tempfile, sys, subprocess, os
113+
import sys, subprocess
114114

115115
# The spawned subprocess has its stdout redirected to a PIPE, and its
116116
# encoding may be different from the current interpreter, on Windows

Lib/test/test_urlparse.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import unittest
22
import urllib.parse
3-
import warnings
43

54
RFC1808_BASE = "http://a/b/c/d;p?q#f"
65
RFC2396_BASE = "http://a/b/c/d;p?q"

Lib/test/test_utf8_mode.py

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

55
import locale
6-
import os
76
import sys
87
import textwrap
98
import unittest

0 commit comments

Comments
 (0)