[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

@@ -385,7 +385,7 @@ class TestCompileExpression(unittest.TestCase):
self.assertEqual(expr(value), result)
with tempfile.TemporaryDirectory() as path:
file = path + "/module_sha1.py"
file = f"{path}/module_sha1.py"
with open(file, "w") as fp:
fp.write("""
import hashlib
@@ -638,7 +638,7 @@ class TestOther(unittest.TestCase):
self.assertIs(module, datetime)
with tempfile.TemporaryDirectory() as path:
file = path + "/module_test.py"
file = f"{path}/module_test.py"
with open(file, "w") as fp:
fp.write("""
import datetime