From ad48fae9eb5c8c93dafcce6edbd02634c3922b6c Mon Sep 17 00:00:00 2001 From: Eduardo Blancas Date: Wed, 6 Nov 2024 09:25:15 -0600 Subject: [PATCH] adds test --- src/tests/integration/test_duckDB.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/integration/test_duckDB.py b/src/tests/integration/test_duckDB.py index d0c460e25..a3cf152d6 100644 --- a/src/tests/integration/test_duckDB.py +++ b/src/tests/integration/test_duckDB.py @@ -235,3 +235,10 @@ def test_commits_all_statements(ip, sql, request): out = ip.run_cell(sql) assert out.error_in_exec is None assert out.result.dict() == {"x": (1, 2)} + + +def test_can_query_existing_df(ip_with_duckdb_sqlalchemy_empty): + df = pd.DataFrame({"city": ["NYC"]}) + ip_with_duckdb_sqlalchemy_empty.run_cell("%sql SET python_scan_all_frames=true") + out = ip_with_duckdb_sqlalchemy_empty.run_cell("%sql SELECT * FROM df;") + assert out.result.dict() == {"city": ("NYC",)}