diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-03-02 09:53:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 09:53:51 (GMT) |
commit | b21d155f57d284aecf9092a9bd24258293965c2f (patch) | |
tree | 3bf7797282fa3d3fc48e668214ae5f5c6bce1dff /Lib/test/test_shutil.py | |
parent | bf63e8d55fd2853df3bb99d66de7f428107aadb3 (diff) | |
download | cpython-b21d155f57d284aecf9092a9bd24258293965c2f.zip cpython-b21d155f57d284aecf9092a9bd24258293965c2f.tar.gz cpython-b21d155f57d284aecf9092a9bd24258293965c2f.tar.bz2 |
bpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930)
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index f3cf43e..2cb2f14 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -22,7 +22,7 @@ import tarfile import zipfile from test import support -from test.support import TESTFN +from test.support import TESTFN, FakePath TESTFN2 = TESTFN + "2" @@ -1232,14 +1232,7 @@ class TestShutil(unittest.TestCase): def check_unpack_archive(self, format): self.check_unpack_archive_with_converter(format, lambda path: path) self.check_unpack_archive_with_converter(format, pathlib.Path) - - class MyPath: - def __init__(self, path): - self.path = path - def __fspath__(self): - return self.path - - self.check_unpack_archive_with_converter(format, MyPath) + self.check_unpack_archive_with_converter(format, FakePath) def check_unpack_archive_with_converter(self, format, converter): root_dir, base_dir = self._create_files() |