[tests] use f-strings (##7671)

This commit is contained in:
Mike Fährmann
2025-08-14 10:22:42 +02:00
parent a87c447af2
commit b9429de774
10 changed files with 117 additions and 111 deletions

View File

@@ -299,7 +299,7 @@ class TestDataJob(TestJob):
for i in range(1, 4):
self.assertEqual(
tjob.data[i][2]["_fallback"],
("https://example.org/alt/{}.jpg".format(i),),
(f"https://example.org/alt/{i}.jpg",),
)
def test_sleep(self):
@@ -382,13 +382,13 @@ class TestExtractor(Extractor):
}
for i in range(1, 4):
url = "{}/{}.jpg".format(root, i)
url = f"{root}/{i}.jpg"
yield Message.Url, url, text.nameext_from_url(url, {
"num" : i,
"tags": ["foo", "bar", "テスト"],
"user": user,
"author": user,
"_fallback": ("{}/alt/{}.jpg".format(root, i),),
"_fallback": (f"{root}/alt/{i}.jpg",),
})