[tests] use f-strings (##7671)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user