Skip to content

Commit bb2bc04

Browse files
vstinnerseehwan80
authored andcommitted
pythongh-131152: Remove unused imports from tests (part 2) (python#131154)
1 parent edabba2 commit bb2bc04

22 files changed

+6
-28
lines changed

Lib/test/test_free_threading/test_func_annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import concurrent.futures
22
import unittest
33
import inspect
4-
from threading import Thread, Barrier
4+
from threading import Barrier
55
from unittest import TestCase
66

77
from test.support import threading_helper, Py_GIL_DISABLED

Lib/test/test_free_threading/test_itertools_batched.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import unittest
2-
import sys
32
from threading import Thread, Barrier
43
from itertools import batched
54
from test.support import threading_helper

Lib/test/test_free_threading/test_methodcaller.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import unittest
22
from threading import Thread
3-
from test.support import threading_helper
43
from operator import methodcaller
54

65

Lib/test/test_glob.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import unittest
77
import warnings
88

9-
from test import support
109
from test.support import is_wasi, Py_DEBUG
1110
from test.support.os_helper import (TESTFN, skip_unless_symlink,
1211
can_symlink, create_empty_file, change_cwd)

Lib/test/test_importlib/extension/test_case_sensitivity.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from importlib import _bootstrap_external
21
from test.support import os_helper
32
import unittest
43
import sys

Lib/test/test_importlib/resources/test_files.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import os
21
import pathlib
32
import py_compile
4-
import shutil
53
import textwrap
64
import unittest
75
import warnings

Lib/test/test_importlib/test_util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from importlib import _bootstrap_external
1010
import os
1111
import pathlib
12-
import re
1312
import string
1413
import sys
1514
from test import support

Lib/test/test_locale.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,6 @@ def test_defaults_UTF8(self):
489489
# valid. Furthermore LC_CTYPE=UTF is used by the UTF-8 locale coercing
490490
# during interpreter startup (on macOS).
491491
import _locale
492-
import os
493492

494493
self.assertEqual(locale._parse_localename('UTF-8'), (None, 'UTF-8'))
495494

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from test.support import import_helper
1919
from test.support import is_emscripten, is_wasi
2020
from test.support import infinite_recursion
21-
from test.support import swap_attr
2221
from test.support import os_helper
2322
from test.support.os_helper import TESTFN, FakePath
2423
from test.test_pathlib import test_pathlib_abc

Lib/test/test_pathlib/test_pathlib_abc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import collections
21
import io
32
import os
43
import errno
54
import unittest
65

7-
from pathlib._os import magic_open
8-
from pathlib.types import _PathParser, PathInfo, _JoinablePath, _ReadablePath, _WritablePath
6+
from pathlib.types import _JoinablePath, _ReadablePath, _WritablePath
97
import posixpath
108

119
from test.support.os_helper import TESTFN

0 commit comments

Comments
 (0)