Skip to content

Commit f4f5dea

Browse files
committed
Add test for brackets within f-string.
1 parent fb6f053 commit f4f5dea

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_fstring_brackets.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# this package
2+
from formate_trailing_commas import trailing_commas_hook
3+
4+
5+
def test_problem_code():
6+
src = """
7+
print(
8+
"Average build time:",
9+
f"{statistics.mean(build_times)}s,",
10+
f"σ {statistics.stdev(build_times)}",
11+
f"(n={len(build_times)})",
12+
)
13+
"""
14+
15+
assert trailing_commas_hook(src) == src

0 commit comments

Comments
 (0)