summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSrinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) <thatiparthysreenivas@gmail.com>2018-11-16 15:32:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-11-16 15:32:58 (GMT)
commit90d0cfb22269261333e82a7c8a17b66d6695f7b6 (patch)
tree6cded6ae606baee53268868d6887a4781830791b /Lib
parent4edeaeac4c194ba5d09187640b5cfca5e03be617 (diff)
downloadcpython-90d0cfb22269261333e82a7c8a17b66d6695f7b6.zip
cpython-90d0cfb22269261333e82a7c8a17b66d6695f7b6.tar.gz
cpython-90d0cfb22269261333e82a7c8a17b66d6695f7b6.tar.bz2
bpo-35202: Remove unused imports in tests. (GH-10561)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_aifc.py2
-rw-r--r--Lib/test/test_asyncio/test_selector_events.py1
-rw-r--r--Lib/test/test_coroutines.py1
-rw-r--r--Lib/test/test_frozen.py1
-rw-r--r--Lib/test/test_future.py1
-rw-r--r--Lib/test/test_gdb.py1
-rw-r--r--Lib/test/test_importlib/test_locks.py1
-rw-r--r--Lib/test/test_minidom.py1
-rw-r--r--Lib/test/test_netrc.py1
-rw-r--r--Lib/test/test_platform.py1
-rw-r--r--Lib/test/test_resource.py1
-rw-r--r--Lib/test/test_sax.py1
-rw-r--r--Lib/test/test_ssl.py1
-rw-r--r--Lib/test/test_time.py1
-rw-r--r--Lib/test/test_traceback.py2
-rw-r--r--Lib/test/test_urlparse.py1
-rw-r--r--Lib/test/test_utf8_mode.py1
17 files changed, 1 insertions, 18 deletions
diff --git a/Lib/test/test_aifc.py b/Lib/test/test_aifc.py
index ff52f5b..c747584 100644
--- a/Lib/test/test_aifc.py
+++ b/Lib/test/test_aifc.py
@@ -7,8 +7,6 @@ import io
import sys
import struct
import aifc
-import warnings
-
class AifcTest(audiotests.AudioWriteTests,
audiotests.AudioTestsWithSourceFile):
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index 236ed38..b99e8e6 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -1,6 +1,5 @@
"""Tests for selector_events.py"""
-import errno
import selectors
import socket
import unittest
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 091b662..8443e65 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -2,7 +2,6 @@ import contextlib
import copy
import inspect
import pickle
-import re
import sys
import types
import unittest
diff --git a/Lib/test/test_frozen.py b/Lib/test/test_frozen.py
index a7c7484..142f17d 100644
--- a/Lib/test/test_frozen.py
+++ b/Lib/test/test_frozen.py
@@ -13,7 +13,6 @@
import sys
import unittest
from test.support import captured_stdout
-from importlib import util
class TestFrozen(unittest.TestCase):
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py
index 4f2f9d2..c60a016 100644
--- a/Lib/test/test_future.py
+++ b/Lib/test/test_future.py
@@ -1,6 +1,5 @@
# Test various flavors of legal and illegal future statements
-from functools import partial
import unittest
from test import support
from textwrap import dedent
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 711fb69..4d1ce4e 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -3,7 +3,6 @@
# The code for testing gdb was adapted from similar work in Unladen Swallow's
# Lib/test/test_jit_gdb.py
-import locale
import os
import platform
import re
diff --git a/Lib/test/test_importlib/test_locks.py b/Lib/test/test_importlib/test_locks.py
index d86172a..21794d9 100644
--- a/Lib/test/test_importlib/test_locks.py
+++ b/Lib/test/test_importlib/test_locks.py
@@ -4,7 +4,6 @@ init = test_util.import_importlib('importlib')
import sys
import threading
-import unittest
import weakref
from test import support
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index ad5be2f..e626e14 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -3,7 +3,6 @@
import copy
import pickle
import io
-import contextlib
from test.support import findfile
import unittest
diff --git a/Lib/test/test_netrc.py b/Lib/test/test_netrc.py
index f59e537..ae53988 100644
--- a/Lib/test/test_netrc.py
+++ b/Lib/test/test_netrc.py
@@ -1,5 +1,4 @@
import netrc, os, unittest, sys, tempfile, textwrap
-from unittest import mock
from test import support
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index c26e193..c92da90 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -1,4 +1,3 @@
-from unittest import mock
import os
import platform
import subprocess
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index b07eb73..62c7963 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
@@ -1,6 +1,5 @@
import contextlib
import sys
-import os
import unittest
from test import support
import time
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 894d86a..9addc06 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -17,7 +17,6 @@ from xml.sax.handler import feature_namespaces, feature_external_ges
from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl
from io import BytesIO, StringIO
import codecs
-import gc
import os.path
import shutil
from urllib.error import URLError
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 6fd2002..74a91f6 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -17,7 +17,6 @@ import traceback
import asyncore
import weakref
import platform
-import functools
import sysconfig
try:
import ctypes
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 62abd89..16b48a9 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -9,7 +9,6 @@ import sysconfig
import time
import threading
import unittest
-import warnings
try:
import _testcapi
except ImportError:
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index a8240b4..96d85e2 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -110,7 +110,7 @@ class TracebackCases(unittest.TestCase):
# Test that tracebacks are correctly printed for encoded source files:
# - correct line number (Issue2384)
# - respect file encoding (Issue3975)
- import tempfile, sys, subprocess, os
+ import sys, subprocess
# The spawned subprocess has its stdout redirected to a PIPE, and its
# encoding may be different from the current interpreter, on Windows
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 6738863..9c71be5 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -1,6 +1,5 @@
import unittest
import urllib.parse
-import warnings
RFC1808_BASE = "http://a/b/c/d;p?q#f"
RFC2396_BASE = "http://a/b/c/d;p?q"
diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py
index 7280ce7..220ff34 100644
--- a/Lib/test/test_utf8_mode.py
+++ b/Lib/test/test_utf8_mode.py
@@ -3,7 +3,6 @@ Test the implementation of the PEP 540: the UTF-8 Mode.
"""
import locale
-import os
import sys
import textwrap
import unittest