Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Nov 7, 2024
1 parent f8fcd6b commit 4d3f3d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,10 @@ def mock_dbapi_raw_execute(monkeypatch, conn_dbapi_duckdb):
def test_raw_execute_doesnt_transpile_sql_query(fixture_name, request):
mock_execute, conn = request.getfixturevalue(fixture_name)

# to prevent the "SET python_scan_all_frames=true" call, since we don't want to
# test that here
conn._is_duckdb_native = False

conn.raw_execute("CREATE TABLE foo (bar INT)")
conn.raw_execute("INSERT INTO foo VALUES (42), (43)")
conn.raw_execute("SELECT * FROM foo LIMIT 1")
Expand Down Expand Up @@ -949,6 +953,10 @@ def mock_dbapi_execute(monkeypatch):
def test_execute_transpiles_sql_query(fixture_name, request):
mock_execute, conn = request.getfixturevalue(fixture_name)

# to prevent the "SET python_scan_all_frames=true" call, since we don't want to
# test that here
conn._is_duckdb_native = False

conn.execute("CREATE TABLE foo (bar INT)")
conn.execute("INSERT INTO foo VALUES (42), (43)")
conn.execute("SELECT * FROM foo LIMIT 1")
Expand Down

0 comments on commit 4d3f3d8

Please sign in to comment.