From b18c79cc5250bacd311c6d97d3e063e75d1afe35 Mon Sep 17 00:00:00 2001 From: Umberto Fasci Date: Fri, 20 Dec 2024 15:07:58 -0600 Subject: [PATCH] resolve test_api_to_sql_index_label_multiindex error --- pandas/tests/io/test_sql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index ea5693e512f7f..a4e11d8007828 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -2026,7 +2026,7 @@ def test_api_to_sql_index_label_multiindex(conn, request): # no index name, defaults to 'level_0' and 'level_1' result = sql.to_sql(temp_frame, table_uuid, conn) assert result == expected_row_count - frame = sql.read_sql_query("SELECT * FROM table_uuid", conn) + frame = sql.read_sql_query(f"SELECT * FROM {table_uuid}", conn) assert frame.columns[0] == "level_0" assert frame.columns[1] == "level_1" @@ -2058,7 +2058,7 @@ def test_api_to_sql_index_label_multiindex(conn, request): index_label=["C", "D"], ) assert result == expected_row_count - frame = sql.read_sql_query("SELECT * FROM table_uuid", conn) + frame = sql.read_sql_query(f"SELECT * FROM {table_uuid}", conn) assert frame.columns[:2].tolist() == ["C", "D"] msg = "Length of 'index_label' should match number of levels, which is 2"