From 3ce6487547b6826ea636b59b0c7f54c77c26090a Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 28 Aug 2023 22:48:00 +0200 Subject: [PATCH] test(python): Fix test failing due to new `adbc` release --- py-polars/tests/unit/io/test_database_write.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/py-polars/tests/unit/io/test_database_write.py b/py-polars/tests/unit/io/test_database_write.py index 9c7efbd9ce23..8f89c5b414de 100644 --- a/py-polars/tests/unit/io/test_database_write.py +++ b/py-polars/tests/unit/io/test_database_write.py @@ -69,31 +69,31 @@ def test_write_database( # note: test a table name that requires quotes to ensure that we handle # it correctly (also supply an explicit db schema with/without quotes) - tbl_name = '"test-data"' + table_name = "test_data" sample_df.write_database( - table_name=f"main.{tbl_name}", + table_name=table_name, connection=f"sqlite:///{test_db}", if_exists="replace", engine=engine, ) if mode == "append": sample_df.write_database( - table_name=f'"main".{tbl_name}', + table_name=table_name, connection=f"sqlite:///{test_db}", if_exists="append", engine=engine, ) sample_df = pl.concat([sample_df, sample_df]) - result = pl.read_database_uri(f"SELECT * FROM {tbl_name}", f"sqlite:///{test_db}") + result = pl.read_database_uri(f"SELECT * FROM {table_name}", f"sqlite:///{test_db}") sample_df = sample_df.with_columns(pl.col("date").cast(pl.Utf8)) assert_frame_equal(sample_df, result) # check that some invalid parameters raise errors for invalid_params in ( {"table_name": "w.x.y.z"}, - {"if_exists": "crunk", "table_name": f"main.{tbl_name}"}, + {"if_exists": "crunk", "table_name": table_name}, ): with pytest.raises((ValueError, NotImplementedError)): sample_df.write_database(