Skip to content

Commit 8ee5fba

Browse files
committed
Keep use f""" for expected
1 parent b5eb58e commit 8ee5fba

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

pandas/tests/io/json/test_pandas.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,18 +1457,16 @@ def test_to_json_indent(self, indent):
14571457

14581458
result = df.to_json(indent=indent)
14591459
spaces = " " * indent
1460-
expected = (
1461-
'{\n'
1462-
f'{spaces}"a":{{\n'
1463-
f'{spaces}{spaces}"0":"foo",\n'
1464-
f'{spaces}{spaces}"1":"baz"\n'
1465-
f'{spaces}}},\n'
1466-
f'{spaces}"b":{{\n'
1467-
f'{spaces}{spaces}"0":"bar",\n'
1468-
f'{spaces}{spaces}"1":"qux"\n'
1469-
f'{spaces}}}\n'
1470-
'}'
1471-
)
1460+
expected = f"""{{
1461+
{spaces}"a":{{
1462+
{spaces}{spaces}"0":"foo",
1463+
{spaces}{spaces}"1":"baz"
1464+
{spaces}}},
1465+
{spaces}"b":{{
1466+
{spaces}{spaces}"0":"bar",
1467+
{spaces}{spaces}"1":"qux"
1468+
{spaces}}}
1469+
}}"""
14721470

14731471
assert result == expected
14741472

0 commit comments

Comments
 (0)