Skip to content

Commit ffb9581

Browse files
Partial f-string
1 parent 9fc42b1 commit ffb9581

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

testing/python/metafunc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ def test_parametrize_scope_overrides(
14381438
self, pytester: Pytester, scope: str, length: int
14391439
) -> None:
14401440
pytester.makepyfile(
1441-
"""
1441+
f"""
14421442
import pytest
14431443
values = []
14441444
def pytest_generate_tests(metafunc):
@@ -1454,9 +1454,9 @@ def test_hello(arg):
14541454
def test_world(arg):
14551455
assert arg in (1,2)
14561456
def test_checklength():
1457-
assert len(values) == %d
1458-
""" # noqa: UP031 (str have no __repr__)
1459-
% (scope, length)
1457+
assert len(values) == {length}
1458+
"""
1459+
% scope
14601460
)
14611461
reprec = pytester.inline_run()
14621462
reprec.assertoutcome(passed=5)

0 commit comments

Comments
 (0)