summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-16 07:25:10 (GMT)
committerGitHub <noreply@github.com>2024-05-16 07:25:10 (GMT)
commit0152dc4ff5534fa2948b95262e70ff6b202b9b99 (patch)
treecf311cb487a6f1956ab942d6356e5b5698659f85 /Lib/test/test_shutil.py
parent0142a2292c3d3bfa56a987d576a9678be0f56931 (diff)
downloadcpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.zip
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.gz
cpython-0152dc4ff5534fa2948b95262e70ff6b202b9b99.tar.bz2
gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (GH-119065)
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 5b0aac6..df9e7a6 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -914,7 +914,7 @@ class TestCopyTree(BaseTest, unittest.TestCase):
'test.txt')))
dst_dir = join(self.mkdtemp(), 'destination')
- shutil.copytree(pathlib.Path(src_dir), dst_dir, ignore=_ignore)
+ shutil.copytree(FakePath(src_dir), dst_dir, ignore=_ignore)
self.assertTrue(exists(join(dst_dir, 'test_dir', 'subdir',
'test.txt')))
@@ -2107,7 +2107,7 @@ class TestArchives(BaseTest, unittest.TestCase):
self.check_unpack_archive_with_converter(
format, lambda path: path, **kwargs)
self.check_unpack_archive_with_converter(
- format, pathlib.Path, **kwargs)
+ format, FakePath, **kwargs)
self.check_unpack_archive_with_converter(format, FakePath, **kwargs)
def check_unpack_archive_with_converter(self, format, converter, **kwargs):
@@ -2672,12 +2672,12 @@ class TestMove(BaseTest, unittest.TestCase):
def test_move_file_to_dir_pathlike_src(self):
# Move a pathlike file to another location on the same filesystem.
- src = pathlib.Path(self.src_file)
+ src = FakePath(self.src_file)
self._check_move_file(src, self.dst_dir, self.dst_file)
def test_move_file_to_dir_pathlike_dst(self):
# Move a file to another pathlike location on the same filesystem.
- dst = pathlib.Path(self.dst_dir)
+ dst = FakePath(self.dst_dir)
self._check_move_file(self.src_file, dst, self.dst_file)
@mock_rename