From 7a314385fa12e32035f4bda72a0cd14135c454ee Mon Sep 17 00:00:00 2001 From: Umberto Fasci Date: Fri, 20 Dec 2024 17:02:48 -0600 Subject: [PATCH] resolve regex error for test_xsqlite_if_exists --- pandas/tests/io/test_sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 529f7181dc3c0..fc36af56d5bed 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -4412,7 +4412,7 @@ def test_xsqlite_if_exists(sqlite_buildin): sql.to_sql( frame=df_if_exists_1, con=sqlite_buildin, name=table_name, if_exists="fail" ) - msg = "Table 'table_if_exists' already exists" + msg = f"Table '{table_name}' already exists" with pytest.raises(ValueError, match=msg): sql.to_sql( frame=df_if_exists_1,