Skip to content

Commit a3d760d

Browse files
committed
test: update expected value for all Python versions
1 parent 0067592 commit a3d760d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tests/_data/string_files/do_format_code.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ source='''def foo():
178178
"""
179179
Hello foo.
180180
"""
181-
x = \
181+
x =\
182182
1'''
183183
expected='''def foo():
184184
"""Hello foo."""
@@ -187,7 +187,7 @@ expected='''def foo():
187187
# Python 3.13+ seems to handle this differently.
188188
expected313='''def foo():
189189
"""Hello foo."""
190-
x = \
190+
x =\
191191
1'''
192192

193193
[code_comments]

tests/formatter/test_do_format_code.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,7 @@ def test_do_format_code(test_key, test_args, args):
146146
)
147147

148148
source = TEST_STRINGS[test_key]["source"]
149-
if test_key == "escaped_newlines" and sys.version_info >= (3, 13):
150-
expected = TEST_STRINGS[test_key]["expected313"]
151-
else:
152-
expected = TEST_STRINGS[test_key]["expected"]
149+
expected = TEST_STRINGS[test_key]["expected"]
153150

154151
result = uut._do_format_code(source)
155152
assert result == expected, f"\nFailed {test_key}\nExpected {expected}\nGot {result}"

0 commit comments

Comments
 (0)