mirror of
https://github.com/python/cpython.git
synced 2024-11-21 12:59:38 +01:00
gh-120417: Remove unused imports in tests (part 2) (#120630)
This commit is contained in:
parent
f916b77fea
commit
5a8a979aeb
@ -1,10 +1,9 @@
|
||||
import sys
|
||||
import test.support
|
||||
import unittest
|
||||
from contextlib import closing
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
from test.support import cpython_only, import_helper, os_helper
|
||||
from test.support import import_helper, os_helper
|
||||
|
||||
dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")
|
||||
# N.B. The test will fail on some platforms without sqlite3
|
||||
|
@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
from types import MethodType
|
||||
|
||||
|
||||
def funcattrs(**kwds):
|
||||
def decorate(func):
|
||||
|
@ -7,7 +7,6 @@ from email.message import Message
|
||||
from test.test_email import TestEmailBase, parameterize
|
||||
from email import headerregistry
|
||||
from email.headerregistry import Address, Group
|
||||
from email.header import decode_header
|
||||
from test.support import ALWAYS_EQ
|
||||
|
||||
|
||||
|
@ -3,9 +3,7 @@ from email import utils
|
||||
import test.support
|
||||
import time
|
||||
import unittest
|
||||
import sys
|
||||
import os.path
|
||||
import zoneinfo
|
||||
|
||||
|
||||
class DateTimeTests(unittest.TestCase):
|
||||
|
||||
|
@ -6,7 +6,6 @@ import tempfile
|
||||
import test.support
|
||||
import unittest
|
||||
import unittest.mock
|
||||
from importlib.resources.abc import Traversable
|
||||
from pathlib import Path
|
||||
|
||||
import ensurepip
|
||||
|
@ -1,6 +1,5 @@
|
||||
"""Tests for Lib/fractions.py."""
|
||||
|
||||
import cmath
|
||||
from decimal import Decimal
|
||||
from test.support import requires_IEEE_754
|
||||
import math
|
||||
|
@ -1,11 +1,9 @@
|
||||
import copy
|
||||
import gc
|
||||
import operator
|
||||
import re
|
||||
import sys
|
||||
import textwrap
|
||||
import threading
|
||||
import types
|
||||
import unittest
|
||||
import weakref
|
||||
try:
|
||||
@ -14,7 +12,7 @@ except ImportError:
|
||||
_testcapi = None
|
||||
|
||||
from test import support
|
||||
from test.support import import_helper, threading_helper, Py_GIL_DISABLED
|
||||
from test.support import import_helper, threading_helper
|
||||
from test.support.script_helper import assert_python_ok
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from itertools import cycle
|
||||
|
@ -5,7 +5,7 @@ from concurrent.futures import ThreadPoolExecutor
|
||||
from threading import Thread
|
||||
from unittest import TestCase
|
||||
|
||||
from test.support import threading_helper, import_helper
|
||||
from test.support import threading_helper
|
||||
|
||||
|
||||
|
||||
|
@ -14,7 +14,6 @@ import re
|
||||
import types
|
||||
import decimal
|
||||
import unittest
|
||||
import warnings
|
||||
from test import support
|
||||
from test.support.os_helper import temp_cwd
|
||||
from test.support.script_helper import assert_python_failure, assert_python_ok
|
||||
|
Loading…
Reference in New Issue
Block a user