summaryrefslogtreecommitdiff
path: root/tests/test_path.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2022-03-13 18:23:15 -0500
committerMichael Merickel <michael@merickel.org>2022-03-13 18:24:26 -0500
commit1f8e290a7b287c5d8aaafd0ff91692d1343ce1a9 (patch)
treef490995d5bf34627b9753b35eb2b7767ae68c3dc /tests/test_path.py
parent1e439035e41da3767acbcae79689fb05dfdeb317 (diff)
downloadpyramid-1f8e290a7b287c5d8aaafd0ff91692d1343ce1a9.tar.gz
pyramid-1f8e290a7b287c5d8aaafd0ff91692d1343ce1a9.tar.bz2
pyramid-1f8e290a7b287c5d8aaafd0ff91692d1343ce1a9.zip
pyupgrade --py37-plus
Diffstat (limited to 'tests/test_path.py')
-rw-r--r--tests/test_path.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/tests/test_path.py b/tests/test_path.py
index 479e12e40..6f12303f7 100644
--- a/tests/test_path.py
+++ b/tests/test_path.py
@@ -339,27 +339,33 @@ class TestPkgResourcesAssetDescriptor(unittest.TestCase):
def test_stream(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
- inst.pkg_resources.resource_stream = lambda x, y: '%s:%s' % (x, y)
+ inst.pkg_resources.resource_stream = lambda x, y: f'{x}:{y}'
s = inst.stream()
- self.assertEqual(s, '%s:%s' % ('tests', 'test_asset.py'))
+ self.assertEqual(s, '{}:{}'.format('tests', 'test_asset.py'))
def test_isdir(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
- inst.pkg_resources.resource_isdir = lambda x, y: '%s:%s' % (x, y)
- self.assertEqual(inst.isdir(), '%s:%s' % ('tests', 'test_asset.py'))
+ inst.pkg_resources.resource_isdir = lambda x, y: f'{x}:{y}'
+ self.assertEqual(
+ inst.isdir(), '{}:{}'.format('tests', 'test_asset.py')
+ )
def test_listdir(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
- inst.pkg_resources.resource_listdir = lambda x, y: '%s:%s' % (x, y)
- self.assertEqual(inst.listdir(), '%s:%s' % ('tests', 'test_asset.py'))
+ inst.pkg_resources.resource_listdir = lambda x, y: f'{x}:{y}'
+ self.assertEqual(
+ inst.listdir(), '{}:{}'.format('tests', 'test_asset.py')
+ )
def test_exists(self):
inst = self._makeOne()
inst.pkg_resources = DummyPkgResource()
- inst.pkg_resources.resource_exists = lambda x, y: '%s:%s' % (x, y)
- self.assertEqual(inst.exists(), '%s:%s' % ('tests', 'test_asset.py'))
+ inst.pkg_resources.resource_exists = lambda x, y: f'{x}:{y}'
+ self.assertEqual(
+ inst.exists(), '{}:{}'.format('tests', 'test_asset.py')
+ )
class TestFSAssetDescriptor(unittest.TestCase):