Skip to content

Commit 4ae4fa8

Browse files
jiayang laiclaude
authored andcommitted
fix: use f-string instead of .format() in show_test_item
Modernize the code by replacing .format() with f-string syntax. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9046569 commit 4ae4fa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def show_test_item(item: Item) -> None:
158158
tw.write(item.nodeid)
159159
used_fixtures = sorted(getattr(item, "fixturenames", []))
160160
if used_fixtures:
161-
tw.write(" (fixtures used: {})".format(", ".join(used_fixtures)))
161+
tw.write(f" (fixtures used: {', '.join(used_fixtures)})")
162162
tw.flush()
163163

164164

0 commit comments

Comments
 (0)