Skip to content

gh-120417: Remove unused imports in tests (part 1) #120629

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
1 change: 0 additions & 1 deletion Lib/test/_test_embed_set_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# (before the site module is run).

import _testinternalcapi
import os
import sys
import unittest
from test import support
Expand Down
1 change: 0 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
raise ImportError('support must be imported from the test package')

import contextlib
import dataclasses
import functools
import _opcode
import os
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test___all__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from test.support import warnings_helper
import os
import sys
import types


if support.check_sanitizer(address=True, memory=True):
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_call.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
set_recursion_limit, skip_on_s390x, import_helper)
set_recursion_limit, skip_on_s390x)
try:
import _testcapi
except ImportError:
Expand All @@ -14,7 +14,6 @@
import itertools
import gc
import contextlib
import sys
import types


Expand Down
2 changes: 0 additions & 2 deletions Lib/test/test_capi/test_list.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import gc
import weakref
import unittest
from test.support import import_helper
from collections import UserList
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import time
import types
import unittest
import warnings
import weakref
import operator
from test import support
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_capi/test_structmembers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest
from test.support import import_helper
from test.support import warnings_helper

# Skip this test if the _testcapi module isn't available.
import_helper.import_module('_testcapi')
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_concurrent_futures/executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import threading
import time
import unittest
import weakref
from concurrent import futures
from test import support
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_ctypes/test_generated_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
import re
from dataclasses import dataclass
from functools import cached_property
import sys

import ctypes
from ctypes import Structure, Union, _SimpleCData
from ctypes import Structure, Union
from ctypes import sizeof, alignment, pointer, string_at
_ctypes_test = import_helper.import_module("_ctypes_test")

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ctypes/test_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import struct
import sys
import unittest
from ctypes import (CDLL, Array, Structure, Union, POINTER, sizeof, byref, alignment,
from ctypes import (CDLL, Structure, Union, POINTER, sizeof, byref, alignment,
c_void_p, c_char, c_wchar, c_byte, c_ubyte,
c_uint8, c_uint16, c_uint32,
c_short, c_ushort, c_int, c_uint,
Expand Down
Loading