Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Lib/test/test_dbm_sqlite3.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_decorators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from types import MethodType


def funcattrs(**kwds):
def decorate(func):
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_email/test_headerregistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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


Expand Down
4 changes: 1 addition & 3 deletions Lib/test/test_email/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import test.support
import time
import unittest
import sys
import os.path
import zoneinfo


class DateTimeTests(unittest.TestCase):

Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_ensurepip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import test.support
import unittest
import unittest.mock
from importlib.resources.abc import Traversable
from pathlib import Path

import ensurepip
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_fractions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Tests for Lib/fractions.py."""

import cmath
from decimal import Decimal
from test.support import requires_IEEE_754
import math
Expand Down
4 changes: 1 addition & 3 deletions Lib/test/test_frame.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -14,7 +12,7 @@
_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


Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_free_threading/test_str.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
import unittest

from itertools import cycle
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_free_threading/test_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from threading import Thread
from unittest import TestCase

from test.support import threading_helper, import_helper
from test.support import threading_helper



Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
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
Expand Down
Loading