Skip to content

Commit

Permalink
adds test
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Nov 6, 2024
1 parent c5c4621 commit ad48fae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tests/integration/test_duckDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",)}

0 comments on commit ad48fae

Please sign in to comment.