Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
e1d4001
Use new test.support helper submodules in tests
shihai1991 Jul 12, 2020
104060d
remove unused module
shihai1991 Jul 12, 2020
62a6061
Merge branch 'master' into bpo_40275_helper_replace_13
shihai1991 Jul 12, 2020
bc385bc
bpo-20181: Convert the readline module to the Argument Clinic (#14326)
ZackerySpytz Jul 12, 2020
bc3d804
bpo-20175: Convert Modules/_multiprocessing to the Argument Clinic (G…
ZackerySpytz Jul 12, 2020
c2819d3
bpo-41146: Convert signal.default_int_handler() to Argument Clinic (G…
serhiy-storchaka Jul 12, 2020
26c9c70
bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)
serhiy-storchaka Jul 13, 2020
56c4331
bpo-32192: A basic lazy importer example (GH-21330)
nanjekyejoannah Jul 13, 2020
170a8a8
Fix repeated words in Classes tutorial (GH-21455)
PaulMcMillan Jul 14, 2020
b3aef83
bpo-32528: Document the change in inheritance of asyncio.CancelledErr…
JustAnotherArchivist Jul 14, 2020
a2d9d5d
bpo-41273: asyncio's proactor read transport's better performance by …
tontinton Jul 14, 2020
0675e5f
bpo-20183: Convert _locale to the Argument Clinic (GH-14201)
ZackerySpytz Jul 15, 2020
3c3411b
bpo-39017: Avoid infinite loop in the tarfile module (GH-21454)
rishi93 Jul 15, 2020
f25bfa2
bpo-41302: Fix build with system libmpdec (GH-21481)
felixonmars Jul 15, 2020
bde9b72
Fix -Wstrict-prototypes warning in thread_pthread.h. (GH-21477)
benjaminp Jul 15, 2020
cddbe8e
Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)
benjaminp Jul 15, 2020
6d537b4
bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() c…
ZackerySpytz Jul 15, 2020
9f11bcc
bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)
zooba Jul 15, 2020
5303bf8
bpo-31844: Remove _markupbase.ParserBase.error() (GH-8562)
berkerpeksag Jul 16, 2020
6ecd55a
bpo-31844: Move whatsnew note to 3.10.rst (GH-21504)
berkerpeksag Jul 16, 2020
4b9dfef
Remove unnecessary spaces in code blocks in urllib.parse.rst (GH-21500)
chrisyeh96 Jul 16, 2020
f2197cb
Fix possibly-unitialized warning in string_parser.c. (GH-21503)
benjaminp Jul 16, 2020
e57f75d
Fix trivial typo in the PEG string parser (GH-21508)
ericvsmith Jul 16, 2020
1349c97
bpo-41300: IDLE - save files with non-ascii chars (GH-21512)
terryjreedy Jul 16, 2020
ee26dc3
bpo-41195: Add getter for Openssl security level (GH-21282)
matthewhughes934 Jul 17, 2020
4134617
bpo-40941: Unify implicit and explicit state in the frame and generat…
markshannon Jul 17, 2020
d9f6d8b
bpo-43104: Update NEWS to include CVE-2020-15801 reference (GH-21521)
zooba Jul 17, 2020
19141a1
Fix a small grammatical mistake in a comment (GH-21526)
brettcannon Jul 17, 2020
61feac4
bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-2…
serhiy-storchaka Jul 18, 2020
77c28b1
bpo-41262: Convert memoryview to Argument Clinic. (GH-21421)
serhiy-storchaka Jul 18, 2020
5837652
bpo-41325: Add version note for args and kwargs property in call obje…
uSpike Jul 18, 2020
d6258af
bpo-39603: Prevent header injection in http methods (GH-18485)
amiremohamadi Jul 18, 2020
f0d0237
bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)
scoder Jul 18, 2020
6f297a3
bpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534)
serhiy-storchaka Jul 19, 2020
de846a1
bpo-41205: Document Decimal power 0 to the 0 (GH-21386)
srinivasreddy Jul 19, 2020
ebbe4cf
bpo-38169: Increase code coverage for SharedMemory and ShareableList …
vinay0410 Jul 19, 2020
36a8204
bpo-41338: Fix DeprecationWarning in tests (GH-21542)
methane Jul 20, 2020
fed528f
bpo-40741: Update macOS installer to use SQLite 3.32.3 (GH-20979)
Jul 20, 2020
9264f19
Doc: fix import of asdl.py when called from outside Doc/. (GH-21529)
JulienPalard Jul 20, 2020
a2425a2
bpo-37703: improve asyncio.gather documentation regarding cancellatio…
vinay0410 Jul 20, 2020
833cd79
Simple Documentation fix: Missing link to return type class. (GH-21291)
Volker-Weissmann Jul 20, 2020
185ac7d
bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)
ZackerySpytz Jul 20, 2020
ca8d63e
bpo-41343: Convert methods of complex to Argument Clinic (GH-21550)
corona10 Jul 20, 2020
93ccf70
bpo-41334: Convert constructors of str, bytes and bytearray to Argume…
serhiy-storchaka Jul 20, 2020
a597f0a
bpo-41342: Convert int.__round__ to Argument Clinic (GH-21549)
serhiy-storchaka Jul 20, 2020
ccbc2bc
bpo-40741: Update Windows build to include SQLite 3.32.3 (GH-21570)
zooba Jul 20, 2020
1bf47e5
bpo-41283: Fix mismatched argument name for imghdr.what (GH-21501)
ammaraskar Jul 21, 2020
808203d
bpo-41364: Reduce import overhead of uuid module (GH-21586)
zooba Jul 21, 2020
f766adc
bpo-41341: Recursive evaluation of ForwardRef in get_type_hints (#21553)
wyfo Jul 22, 2020
4ce1885
bpo-41369 Update to libmpdec-2.5.1: new features (GH-21593)
skrah Jul 22, 2020
e45c083
Stick with the phrase "default parameter value" (GH-21590)
andresdelfino Jul 22, 2020
b1bac9c
bpo-41182 selector: use DefaultSelector based upon implementation (GH…
Akasurde Jul 23, 2020
b5ffc5c
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
ZackerySpytz Jul 23, 2020
5a7e588
bpo-41366: Fix clang warning for sign conversion (GH-21592)
henryiii Jul 23, 2020
e89752d
bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept(…
agronholm Jul 23, 2020
aaac3b5
bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed ne…
serhiy-storchaka Jul 25, 2020
0454fd7
bpo-37309: NEWS for #41373 (GH-21612)
terryjreedy Jul 25, 2020
b9063e5
bpo-38731: Add --quiet option to py_compile CLI (GH-17134)
gvsheva Jul 25, 2020
1ca7578
bpo-41314: fixed annotations __future__ version (GH-21616)
YoSTEALTH Jul 25, 2020
004e82b
bpo-39868: Add documentation for Assignment Expressions (walrus, PEP …
shankarj67 Jul 25, 2020
d481884
bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)
serhiy-storchaka Jul 26, 2020
3b83635
Delete remaining references to Grammar/Grammar from docs (#21624)
gvanrossum Jul 26, 2020
505d16d
Fix atexitmodule doc (GH-21456)
linchiwei123 Jul 26, 2020
36457bb
bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)
Akuli Jul 27, 2020
e93448a
bpo-41340: Removed fallback implementation for strdup (GH-21634)
Jul 27, 2020
d2b0cab
bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)
pxinwr Jul 27, 2020
aa7c22e
bpo-41401: Fix test_fspath_support in test_io. (GH-21640)
serhiy-storchaka Jul 27, 2020
ae085b1
bpo-40939: Use the new grammar for the grammar specification document…
pablogsal Jul 27, 2020
dbdeaa2
bpo-40939: Remove even more references to the old parser (GH-21642)
lysnikolaou Jul 27, 2020
68732c1
bpo-41045: Document debug feature of f-strings ('=') (GH-21509)
amaajemyfren Jul 27, 2020
d00400d
Validate the AST produced by the parser in debug mode (GH-21643)
pablogsal Jul 27, 2020
f45a004
bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)
ZackerySpytz Jul 28, 2020
7655ae8
bpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (…
Jul 28, 2020
97ac216
bpo-41412 and bpo-40948: Windows installer updates (GH-21656)
zooba Jul 28, 2020
7fff0da
Fix `List_Append` description, list is extracted at TOS1[-i] (GH-21465)
zhangyangyu Jul 28, 2020
fa966e2
Remove incorrect mention of method.__class__ in descriptor docs (GH-2…
Jongy Jul 28, 2020
744a9c5
closes bpo-38156: Always handle interrupts in PyOS_StdioReadline. (GH…
benjaminp Jul 29, 2020
953733b
bpo-41426 Fix grammar in curses.getmouse() documentation (GH-21677)
s3bw Jul 29, 2020
2c6db7b
bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-…
markshannon Jul 30, 2020
88c59f6
bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)
tirkarthi Jul 31, 2020
b9c5c17
bpo-41421: Algebraic simplification for random.paretovariate() (GH-21…
rhettinger Aug 1, 2020
577fbbd
random module: Convert a "while 1" to "while True (GH-21700)
rhettinger Aug 2, 2020
51a9b9e
bpo-40979: refactored typing.rst; (mostly) same content, new sub-sect…
ramalho Aug 2, 2020
dd7378e
bpo-41424: Remove extra words in Tkinter-Packer documentation (GH-21707)
nmaynes Aug 3, 2020
78aeea9
bpo-41425: Make tkinter doc example runnable (GH-21706)
nerandell Aug 3, 2020
2edc37a
A (very) slight speed improvement for iterating over bytes (#21705)
gvanrossum Aug 3, 2020
d23a13f
bpo-40275: Use new test.support helper submodules in tests (GH-21449)
shihai1991 Aug 3, 2020
f491296
bpo-40275: Use new test.support helper submodules in tests (GH-21451)
shihai1991 Aug 3, 2020
7ad643a
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
shihai1991 Aug 3, 2020
4c461ad
bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH…
vstinner Aug 3, 2020
587f073
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
vstinner Aug 4, 2020
11c2ff2
bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)
vstinner Aug 4, 2020
58220f0
bpo-41431: Optimize dict_merge for copy (GH-21674)
methane Aug 4, 2020
b568ebb
bpo-36982: Add support for extended color functions in ncurses 6.1 (G…
hpjansson Aug 4, 2020
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
4 changes: 4 additions & 0 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
TESTFN, rmtree, temp_umask, TESTFN_UNENCODABLE, temp_dir)
from test.support import script_helper
from test.support import threading_helper
from test.support.import_helper import (forget, make_legacy_pyc, unlink,
unload, DirsOnSysPath)
from test.support.os_helper import (TESTFN, rmtree, temp_umask,
TESTFN_UNENCODABLE, temp_dir)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these changes are already merged into master via the GH-21412: commit 96a6a6d. Maybe rebase your PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry for this terrible rebase operation, I use a new PR to replace it.

from test.test_importlib.util import uncache
from types import ModuleType

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_importlib/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ def build_files(file_defs, prefix=pathlib.Path()):
class FileBuilder:
def unicode_filename(self):
try:
import test.support
from test.support import os_helper
except ImportError:
# outside CPython, hard-code a unicode snowman
return '☃'
return test.support.FS_NONASCII or \
return os_helper.FS_NONASCII or \
self.skip("File system does not support non-ascii.")


Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_importlib/import_/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import unittest
from test import support
from test.support import import_helper


class ParentModuleTests:
Expand Down Expand Up @@ -98,7 +99,7 @@ def module_injection():
try:
submodule = self.__import__(subname)
finally:
support.unload(subname)
import_helper.unload(subname)


(Frozen_ParentTests,
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/source/test_file_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import unittest
import warnings

from test.support import make_legacy_pyc, unload
from test.support.import_helper import make_legacy_pyc, unload

from test.test_py_compile import without_source_date_epoch
from test.test_py_compile import SourceDateEpochTestMeta
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/source/test_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import stat
import sys
import tempfile
from test.support import make_legacy_pyc
from test.support.import_helper import make_legacy_pyc
import unittest
import warnings

Expand Down
5 changes: 3 additions & 2 deletions Lib/test/test_importlib/test_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import sys
from test import support
from test.support import import_helper
import types
import unittest
from unittest import mock
Expand Down Expand Up @@ -579,8 +580,8 @@ class InspectLoaderLoadModuleTests:
module_name = 'blah'

def setUp(self):
support.unload(self.module_name)
self.addCleanup(support.unload, self.module_name)
import_helper.unload(self.module_name)
self.addCleanup(import_helper.unload, self.module_name)

def load(self, loader):
spec = self.util.spec_from_loader(self.module_name, loader)
Expand Down
18 changes: 10 additions & 8 deletions Lib/test/test_importlib/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import os.path
import sys
from test import support
from test.support import import_helper
from test.support import os_helper
import types
import unittest
import warnings
Expand Down Expand Up @@ -200,7 +202,7 @@ class ReloadTests:
def test_reload_modules(self):
for mod in ('tokenize', 'time', 'marshal'):
with self.subTest(module=mod):
with support.CleanImport(mod):
with import_helper.CleanImport(mod):
module = self.init.import_module(mod)
self.init.reload(module)

Expand All @@ -221,7 +223,7 @@ def code():
self.assertEqual(reloaded.spam, 3)

def test_reload_missing_loader(self):
with support.CleanImport('types'):
with import_helper.CleanImport('types'):
import types
loader = types.__loader__
del types.__loader__
Expand All @@ -232,7 +234,7 @@ def test_reload_missing_loader(self):
self.assertEqual(reloaded.__loader__.path, loader.path)

def test_reload_loader_replaced(self):
with support.CleanImport('types'):
with import_helper.CleanImport('types'):
import types
types.__loader__ = None
self.init.invalidate_caches()
Expand All @@ -244,9 +246,9 @@ def test_reload_loader_replaced(self):

def test_reload_location_changed(self):
name = 'spam'
with support.temp_cwd(None) as cwd:
with os_helper.temp_cwd(None) as cwd:
with test_util.uncache('spam'):
with support.DirsOnSysPath(cwd):
with import_helper.DirsOnSysPath(cwd):
# Start as a plain module.
self.init.invalidate_caches()
path = os.path.join(cwd, name + '.py')
Expand All @@ -257,7 +259,7 @@ def test_reload_location_changed(self):
'__cached__': cached,
'__doc__': None,
}
support.create_empty_file(path)
os_helper.create_empty_file(path)
module = self.init.import_module(name)
ns = vars(module).copy()
loader = ns.pop('__loader__')
Expand Down Expand Up @@ -295,9 +297,9 @@ def test_reload_location_changed(self):

def test_reload_namespace_changed(self):
name = 'spam'
with support.temp_cwd(None) as cwd:
with os_helper.temp_cwd(None) as cwd:
with test_util.uncache('spam'):
with support.DirsOnSysPath(cwd):
with import_helper.DirsOnSysPath(cwd):
# Start as a namespace package.
self.init.invalidate_caches()
bad_path = os.path.join(cwd, name, '__init.py')
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/test_pkg_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import unittest

from importlib.util import cache_from_source
from test.support import create_empty_file
from test.support.os_helper import create_empty_file

class TestImport(unittest.TestCase):

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_importlib/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os.path
import pathlib
from test.support import CleanImport
from test.support.import_helper import CleanImport
import unittest
import sys
import warnings
Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_importlib/test_threaded_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import threading
import unittest
from unittest import mock
from test.support import (
verbose, run_unittest, TESTFN,
forget, unlink, rmtree)
from test.support import (verbose, run_unittest)
from test.support.import_helper import forget
from test.support.os_helper import (TESTFN, unlink, rmtree)
from test.support import threading_helper

def task(N, done, done_tasks, errors):
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_importlib/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import sys
import unittest
from test import support
from test.support import import_helper
from distutils.util import get_platform
from contextlib import contextmanager
from .util import temp_module

support.import_module('winreg', required_on=['win'])
import_helper.import_module('winreg', required_on=['win'])
from winreg import (
CreateKey, HKEY_CURRENT_USER,
SetValue, REG_SZ, KEY_ALL_ACCESS,
Expand Down
11 changes: 6 additions & 5 deletions Lib/test/test_importlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pathlib import Path, PurePath
from test import support
from test.support import import_helper
from test.support import os_helper
import unittest
import sys
import tempfile
Expand Down Expand Up @@ -159,9 +160,9 @@ def uncache(*names):
@contextlib.contextmanager
def temp_module(name, content='', *, pkg=False):
conflicts = [n for n in sys.modules if n.partition('.')[0] == name]
with support.temp_cwd(None) as cwd:
with os_helper.temp_cwd(None) as cwd:
with uncache(name, *conflicts):
with support.DirsOnSysPath(cwd):
with import_helper.DirsOnSysPath(cwd):
invalidate_caches()

location = os.path.join(cwd, name)
Expand Down Expand Up @@ -397,7 +398,7 @@ def create_modules(*names):
state_manager.__exit__(None, None, None)
if uncache_manager is not None:
uncache_manager.__exit__(None, None, None)
support.rmtree(temp_dir)
os_helper.rmtree(temp_dir)


def mock_path_hook(*entries, importer):
Expand Down Expand Up @@ -573,8 +574,8 @@ def tearDownClass(cls):
pass

def setUp(self):
modules = support.modules_setup()
self.addCleanup(support.modules_cleanup, *modules)
modules = import_helper.modules_setup()
self.addCleanup(import_helper.modules_cleanup, *modules)


class ZipSetup(ZipSetupBase):
Expand Down
4 changes: 3 additions & 1 deletion Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
except ImportError:
ThreadPoolExecutor = None

from test.support import run_unittest, TESTFN, DirsOnSysPath, cpython_only
from test.support import run_unittest, cpython_only
from test.support import MISSING_C_DOCSTRINGS, ALWAYS_EQ
from test.support.import_helper import DirsOnSysPath
from test.support.os_helper import TESTFN
from test.support.script_helper import assert_python_ok, assert_python_failure
from test import inspect_fodder as mod
from test import inspect_fodder2 as mod2
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import test.support
from test import support
from test.support import socket_helper
from test.support import (captured_stderr, TESTFN, EnvironmentVarGuard,
change_cwd)
from test.support import captured_stderr
from test.support.os_helper import TESTFN, EnvironmentVarGuard, change_cwd
import builtins
import encodings
import glob
Expand Down
15 changes: 8 additions & 7 deletions Lib/test/test_tools/test_fixcid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import runpy
import sys
from test import support
from test.support import os_helper
from test.test_tools import skip_if_missing, scriptsdir
import unittest

Expand Down Expand Up @@ -57,15 +58,15 @@ def test_alter_comments(self):
)

def test_directory(self):
os.mkdir(support.TESTFN)
self.addCleanup(support.rmtree, support.TESTFN)
c_filename = os.path.join(support.TESTFN, "file.c")
os.mkdir(os_helper.TESTFN)
self.addCleanup(os_helper.rmtree, os_helper.TESTFN)
c_filename = os.path.join(os_helper.TESTFN, "file.c")
with open(c_filename, "w") as file:
file.write("int xx;\n")
with open(os.path.join(support.TESTFN, "file.py"), "w") as file:
with open(os.path.join(os_helper.TESTFN, "file.py"), "w") as file:
file.write("xx = 'unaltered'\n")
script = os.path.join(scriptsdir, "fixcid.py")
output = self.run_script(args=(support.TESTFN,))
output = self.run_script(args=(os_helper.TESTFN,))
self.assertMultiLineEqual(output,
"{}:\n"
"1\n"
Expand All @@ -74,10 +75,10 @@ def test_directory(self):
)

def run_script(self, input="", *, args=("-",), substfile="xx yy\n"):
substfilename = support.TESTFN + ".subst"
substfilename = os_helper.TESTFN + ".subst"
with open(substfilename, "w") as file:
file.write(substfile)
self.addCleanup(support.unlink, substfilename)
self.addCleanup(os_helper.unlink, substfilename)

argv = ["fixcid.py", "-s", substfilename] + list(args)
script = os.path.join(scriptsdir, "fixcid.py")
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_tools/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from test.support.script_helper import assert_python_ok
from test.test_tools import skip_if_missing, toolsdir
from test.support import temp_cwd, temp_dir
from test.support.os_helper import temp_cwd, temp_dir


skip_if_missing()
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_tools/test_lll.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import tempfile
from test import support
from test.support import os_helper
from test.test_tools import skip_if_missing, import_tool
import unittest

Expand All @@ -14,7 +15,7 @@ class lllTests(unittest.TestCase):
def setUp(self):
self.lll = import_tool('lll')

@support.skip_unless_symlink
@os_helper.skip_unless_symlink
def test_lll_multiple_dirs(self):
with tempfile.TemporaryDirectory() as dir1, \
tempfile.TemporaryDirectory() as dir2:
Expand Down
9 changes: 5 additions & 4 deletions Lib/test/test_tools/test_pathfix.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import unittest
from test import support
from test.support import os_helper
from test.test_tools import scriptsdir, skip_if_missing


Expand All @@ -14,7 +15,7 @@ class TestPathfixFunctional(unittest.TestCase):
script = os.path.join(scriptsdir, 'pathfix.py')

def setUp(self):
self.addCleanup(support.unlink, support.TESTFN)
self.addCleanup(os_helper.unlink, os_helper.TESTFN)

def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='',
directory=''):
Expand All @@ -24,7 +25,7 @@ def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='',
filename = os.path.join(directory, 'script-A_1.py')
pathfix_arg = directory
else:
filename = support.TESTFN
filename = os_helper.TESTFN
pathfix_arg = filename

with open(filename, 'w', encoding='utf8') as f:
Expand Down Expand Up @@ -56,8 +57,8 @@ def pathfix(self, shebang, pathfix_flags, exitcode=0, stdout='', stderr='',
return new_shebang

def test_recursive(self):
tmpdir = support.TESTFN + '.d'
self.addCleanup(support.rmtree, tmpdir)
tmpdir = os_helper.TESTFN + '.d'
self.addCleanup(os_helper.rmtree, tmpdir)
os.mkdir(tmpdir)
expected_stderr = f"recursedown('{os.path.basename(tmpdir)}')\n"
self.assertEqual(
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_tools/test_pindent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import subprocess
import textwrap
from test import support
from test.support import os_helper
from test.support.script_helper import assert_python_ok

from test.test_tools import scriptsdir, skip_if_missing
Expand Down Expand Up @@ -34,7 +35,7 @@ def lstriplines(self, data):

def test_selftest(self):
self.maxDiff = None
with support.temp_dir() as directory:
with os_helper.temp_dir() as directory:
data_path = os.path.join(directory, '_test.py')
with open(self.script) as f:
closed = f.read()
Expand Down
Loading