mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-35202: Remove unused imports in tests. (GH-10561)
This commit is contained in:
parent
4edeaeac4c
commit
90d0cfb222
17 changed files with 1 additions and 18 deletions
|
@ -7,8 +7,6 @@ import io
|
||||||
import sys
|
import sys
|
||||||
import struct
|
import struct
|
||||||
import aifc
|
import aifc
|
||||||
import warnings
|
|
||||||
|
|
||||||
|
|
||||||
class AifcTest(audiotests.AudioWriteTests,
|
class AifcTest(audiotests.AudioWriteTests,
|
||||||
audiotests.AudioTestsWithSourceFile):
|
audiotests.AudioTestsWithSourceFile):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""Tests for selector_events.py"""
|
"""Tests for selector_events.py"""
|
||||||
|
|
||||||
import errno
|
|
||||||
import selectors
|
import selectors
|
||||||
import socket
|
import socket
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -2,7 +2,6 @@ import contextlib
|
||||||
import copy
|
import copy
|
||||||
import inspect
|
import inspect
|
||||||
import pickle
|
import pickle
|
||||||
import re
|
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import captured_stdout
|
from test.support import captured_stdout
|
||||||
from importlib import util
|
|
||||||
|
|
||||||
|
|
||||||
class TestFrozen(unittest.TestCase):
|
class TestFrozen(unittest.TestCase):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Test various flavors of legal and illegal future statements
|
# Test various flavors of legal and illegal future statements
|
||||||
|
|
||||||
from functools import partial
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
# The code for testing gdb was adapted from similar work in Unladen Swallow's
|
# The code for testing gdb was adapted from similar work in Unladen Swallow's
|
||||||
# Lib/test/test_jit_gdb.py
|
# Lib/test/test_jit_gdb.py
|
||||||
|
|
||||||
import locale
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
|
|
|
@ -4,7 +4,6 @@ init = test_util.import_importlib('importlib')
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import unittest
|
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import copy
|
import copy
|
||||||
import pickle
|
import pickle
|
||||||
import io
|
import io
|
||||||
import contextlib
|
|
||||||
from test.support import findfile
|
from test.support import findfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import netrc, os, unittest, sys, tempfile, textwrap
|
import netrc, os, unittest, sys, tempfile, textwrap
|
||||||
from unittest import mock
|
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
from unittest import mock
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import contextlib
|
import contextlib
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -17,7 +17,6 @@ from xml.sax.handler import feature_namespaces, feature_external_ges
|
||||||
from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl
|
from xml.sax.xmlreader import InputSource, AttributesImpl, AttributesNSImpl
|
||||||
from io import BytesIO, StringIO
|
from io import BytesIO, StringIO
|
||||||
import codecs
|
import codecs
|
||||||
import gc
|
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
from urllib.error import URLError
|
from urllib.error import URLError
|
||||||
|
|
|
@ -17,7 +17,6 @@ import traceback
|
||||||
import asyncore
|
import asyncore
|
||||||
import weakref
|
import weakref
|
||||||
import platform
|
import platform
|
||||||
import functools
|
|
||||||
import sysconfig
|
import sysconfig
|
||||||
try:
|
try:
|
||||||
import ctypes
|
import ctypes
|
||||||
|
|
|
@ -9,7 +9,6 @@ import sysconfig
|
||||||
import time
|
import time
|
||||||
import threading
|
import threading
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
|
||||||
try:
|
try:
|
||||||
import _testcapi
|
import _testcapi
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -110,7 +110,7 @@ class TracebackCases(unittest.TestCase):
|
||||||
# Test that tracebacks are correctly printed for encoded source files:
|
# Test that tracebacks are correctly printed for encoded source files:
|
||||||
# - correct line number (Issue2384)
|
# - correct line number (Issue2384)
|
||||||
# - respect file encoding (Issue3975)
|
# - respect file encoding (Issue3975)
|
||||||
import tempfile, sys, subprocess, os
|
import sys, subprocess
|
||||||
|
|
||||||
# The spawned subprocess has its stdout redirected to a PIPE, and its
|
# The spawned subprocess has its stdout redirected to a PIPE, and its
|
||||||
# encoding may be different from the current interpreter, on Windows
|
# encoding may be different from the current interpreter, on Windows
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import unittest
|
import unittest
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import warnings
|
|
||||||
|
|
||||||
RFC1808_BASE = "http://a/b/c/d;p?q#f"
|
RFC1808_BASE = "http://a/b/c/d;p?q#f"
|
||||||
RFC2396_BASE = "http://a/b/c/d;p?q"
|
RFC2396_BASE = "http://a/b/c/d;p?q"
|
||||||
|
|
|
@ -3,7 +3,6 @@ Test the implementation of the PEP 540: the UTF-8 Mode.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import locale
|
import locale
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
import unittest
|
import unittest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue