diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-05-26 20:16:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 20:16:11 (GMT) |
commit | f6fbdb90ee450ad693f7a7809035d0dc968f98b7 (patch) | |
tree | f83611c5e6c9a6d5215f00245a4c59460f6eb2a8 /Lib/test/test_importlib | |
parent | 6cc800d3634fdd002b986c3ffe6a3d5540f311a0 (diff) | |
download | cpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.zip cpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.tar.gz cpython-f6fbdb90ee450ad693f7a7809035d0dc968f98b7.tar.bz2 |
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387)
Automerge-Triggered-By: GH:jaraco
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r-- | Lib/test/test_importlib/test_reader.py | 4 | ||||
-rw-r--r-- | Lib/test/test_importlib/test_resource.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_importlib/test_reader.py b/Lib/test/test_importlib/test_reader.py index ed1f6be..9d20c97 100644 --- a/Lib/test/test_importlib/test_reader.py +++ b/Lib/test/test_importlib/test_reader.py @@ -79,7 +79,7 @@ class MultiplexedPathTest(unittest.TestCase): def test_repr(self): self.assertEqual( repr(MultiplexedPath(self.folder)), - "MultiplexedPath('{}')".format(self.folder), + f"MultiplexedPath('{self.folder}')", ) def test_name(self): @@ -121,7 +121,7 @@ class NamespaceReaderTest(unittest.TestCase): reader = NamespaceReader(namespacedata01.__spec__.submodule_search_locations) root = os.path.abspath(os.path.join(__file__, '..', 'namespacedata01')) self.assertIsInstance(reader.files(), MultiplexedPath) - self.assertEqual(repr(reader.files()), "MultiplexedPath('{}')".format(root)) + self.assertEqual(repr(reader.files()), f"MultiplexedPath('{root}')") if __name__ == '__main__': diff --git a/Lib/test/test_importlib/test_resource.py b/Lib/test/test_importlib/test_resource.py index f8d861e..003f7e9 100644 --- a/Lib/test/test_importlib/test_resource.py +++ b/Lib/test/test_importlib/test_resource.py @@ -152,7 +152,7 @@ class DeletingZipsTest(unittest.TestCase): data_path = pathlib.Path(self.ZIP_MODULE.__file__) data_dir = data_path.parent self.source_zip_path = data_dir / 'ziptestdata.zip' - self.zip_path = pathlib.Path('{}.zip'.format(uuid.uuid4())).absolute() + self.zip_path = pathlib.Path(f'{uuid.uuid4()}.zip').absolute() self.zip_path.write_bytes(self.source_zip_path.read_bytes()) sys.path.append(str(self.zip_path)) self.data = import_module('ziptestdata') |