Skip to content

Commit fbbce37

Browse files
committed
Revert some import sorting
1 parent baec453 commit fbbce37

File tree

5 files changed

+15
-31
lines changed

5 files changed

+15
-31
lines changed

Lib/test/test_capi/test_misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class InstanceMethod:
7878

7979
CURRENT_THREAD_REGEX = r'Current thread.*:\n' if not support.Py_GIL_DISABLED else r'Stack .*:\n'
8080

81+
8182
@support.force_not_colorized_test_class
8283
class CAPITest(unittest.TestCase):
8384

Lib/test/test_cmd_line_script.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414

1515
import textwrap
1616
from test import support
17-
from test.support import (
18-
force_not_colorized_test_class,
19-
import_helper,
20-
is_apple,
21-
os_helper,
22-
)
17+
from test.support import import_helper, is_apple, os_helper
2318
from test.support.script_helper import (
2419
make_pkg, make_script, make_zip_pkg, make_zip_script,
2520
assert_python_ok, assert_python_failure, spawn_python, kill_python)
@@ -94,7 +89,7 @@ def _make_test_zip_pkg(zip_dir, zip_basename, pkg_name, script_basename,
9489
return to_return
9590

9691

97-
@force_not_colorized_test_class
92+
@support.force_not_colorized_test_class
9893
class CmdLineTest(unittest.TestCase):
9994
def _check_output(self, script_name, exit_code, data,
10095
expected_file, expected_argv0,

Lib/test/test_compileall.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
_have_multiprocessing = False
2727

2828
from test import support
29-
from test.support import force_not_colorized
3029
from test.support import os_helper
3130
from test.support import script_helper
3231
from test.test_py_compile import without_source_date_epoch
@@ -767,7 +766,7 @@ def test_d_compile_error(self):
767766
rc, out, err = self.assertRunNotOK('-q', '-d', 'dinsdale', self.pkgdir)
768767
self.assertRegex(out, b'File "dinsdale')
769768

770-
@force_not_colorized
769+
@support.force_not_colorized
771770
def test_d_runtime_error(self):
772771
bazfn = script_helper.make_script(self.pkgdir, 'baz', 'raise Exception')
773772
self.assertRunOK('-q', '-d', 'dinsdale', self.pkgdir)

Lib/test/test_exceptions.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,11 @@
1111
from itertools import product
1212
from textwrap import dedent
1313

14-
from test.support import (
15-
SuppressCrashReport,
16-
captured_stderr,
17-
check_impl_detail,
18-
cpython_only,
19-
force_not_colorized,
20-
force_not_colorized_test_class,
21-
gc_collect,
22-
no_tracing,
23-
script_helper,
24-
)
14+
from test.support import (captured_stderr, check_impl_detail,
15+
cpython_only, gc_collect,
16+
no_tracing, script_helper,
17+
SuppressCrashReport,
18+
force_not_colorized)
2519
from test.support.import_helper import import_module
2620
from test.support.os_helper import TESTFN, unlink
2721
from test.support.warnings_helper import check_warnings
@@ -2187,7 +2181,7 @@ def test_multiline_not_highlighted(self):
21872181
self.assertEqual(result[-len(expected):], expected)
21882182

21892183

2190-
@force_not_colorized_test_class
2184+
@support.force_not_colorized_test_class
21912185
class SyntaxErrorTests(unittest.TestCase):
21922186
maxDiff = None
21932187

Lib/test/test_inspect/test_inspect.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,13 @@
3535
except ImportError:
3636
ThreadPoolExecutor = None
3737

38-
from test.support import (
39-
ALWAYS_EQ,
40-
MISSING_C_DOCSTRINGS,
41-
cpython_only,
42-
force_not_colorized,
43-
has_subprocess_support,
44-
import_helper,
45-
run_no_yield_async_fn,
46-
)
38+
from test.support import cpython_only, import_helper
39+
from test.support import MISSING_C_DOCSTRINGS, ALWAYS_EQ
40+
from test.support import run_no_yield_async_fn
4741
from test.support.import_helper import DirsOnSysPath, ready_to_import
4842
from test.support.os_helper import TESTFN, temp_cwd
4943
from test.support.script_helper import assert_python_ok, assert_python_failure, kill_python
44+
from test.support import has_subprocess_support
5045
from test import support
5146

5247
from test.test_inspect import inspect_fodder as mod
@@ -891,7 +886,7 @@ def test_getsource_stdlib_decimal(self):
891886
self.assertEqual(src.splitlines(True), lines)
892887

893888
class TestGetsourceInteractive(unittest.TestCase):
894-
@force_not_colorized
889+
@support.force_not_colorized
895890
def test_getclasses_interactive(self):
896891
# bpo-44648: simulate a REPL session;
897892
# there is no `__file__` in the __main__ module

0 commit comments

Comments
 (0)