We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5eb58e commit 8ee5fbaCopy full SHA for 8ee5fba
pandas/tests/io/json/test_pandas.py
@@ -1457,18 +1457,16 @@ def test_to_json_indent(self, indent):
1457
1458
result = df.to_json(indent=indent)
1459
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
- )
+ expected = f"""{{
+{spaces}"a":{{
+{spaces}{spaces}"0":"foo",
+{spaces}{spaces}"1":"baz"
+{spaces}}},
+{spaces}"b":{{
+{spaces}{spaces}"0":"bar",
+{spaces}{spaces}"1":"qux"
+{spaces}}}
+}}"""
1472
1473
assert result == expected
1474
0 commit comments