gh-120417: Remove unused imports in tests (part 2) (#120630)

This commit is contained in:
Victor Stinner 2024-06-17 21:05:37 +02:00 committed by GitHub
parent f916b77fea
commit 5a8a979aeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 5 additions and 15 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
import unittest
from types import MethodType
def funcattrs(**kwds):
def decorate(func):

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -1,6 +1,5 @@
"""Tests for Lib/fractions.py."""
import cmath
from decimal import Decimal
from test.support import requires_IEEE_754
import math

View File

@ -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

View File

@ -1,4 +1,3 @@
import sys
import unittest
from itertools import cycle

View File

@ -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

View File

@ -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