Skip to content

Commit 1bba16b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4241f4a commit 1bba16b

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

pandas/tests/io/json/test_json_table_schema.py

+17-15
Original file line numberDiff line numberDiff line change
@@ -883,20 +883,22 @@ def test_read_json_table_orient_period_depr_freq(self, freq):
883883
tm.assert_frame_equal(df, result)
884884

885885
def test_read_json_table_non_string_column_names(self) -> None:
886-
bad_json = json.dumps({
887-
"schema": {
888-
"fields": [
889-
{"name": 0, "type": "integer"},
890-
{"name": 1, "type": "string"}
891-
],
892-
"primaryKey": [],
893-
"pandas_version": "1.0.0"
894-
},
895-
"data": [
896-
[1, "a"],
897-
[2, "b"]
898-
]
899-
})
886+
bad_json = json.dumps(
887+
{
888+
"schema": {
889+
"fields": [
890+
{"name": 0, "type": "integer"},
891+
{"name": 1, "type": "string"},
892+
],
893+
"primaryKey": [],
894+
"pandas_version": "1.0.0",
895+
},
896+
"data": [[1, "a"], [2, "b"]],
897+
}
898+
)
900899

901-
with pytest.raises(ValueError, match="All column names must be strings when using orient='table'"):
900+
with pytest.raises(
901+
ValueError,
902+
match="All column names must be strings when using orient='table'",
903+
):
902904
pd.read_json(StringIO(bad_json), orient="table")

0 commit comments

Comments
 (0)