Skip to content

Commit f9a8b52

Browse files
committed
Fix tests (to ensure we don't "fix" the test input)
1 parent 2c01fe0 commit f9a8b52

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

formate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def isort_hook(
171171
return source
172172

173173

174-
# e.g. " ), )" or " )))), )"
174+
# e.g. " ) )" or " )))), )"
175175
yapf_nested_fixup_pattern = re.compile(r"([ \t])([)}\]]?)([)}\]], )([)}\]])")
176176

177177

tests/test_yapf_nested_fixups.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def test_nested_call(advanced_file_regression: AdvancedFileRegressionFixture):
1111
a = cls(**dict(map(
1212
lambda f: (f[0].name, curried.get_in(f[1], d, f[0].default)),
1313
from_fields,
14-
), ), )
15-
"""
14+
)⸴ )⸴ )
15+
""".replace('⸴', ',')
1616

1717
advanced_file_regression.check(yapf_hook(src))
1818

@@ -25,9 +25,9 @@ def foo():
2525
{"array_options": [1, 2, 3]},
2626
{"another_array": [1, 2]},
2727
{'c': 3},
28-
], },
28+
] },
2929
}
30-
"""
30+
""".replace('⸴', ',')
3131

3232
advanced_file_regression.check(
3333
yapf_hook(src, yapf_style=PathPlus(__file__).parent.parent.joinpath(".style.yapf").as_posix()),

0 commit comments

Comments
 (0)