Skip to content

Commit cc20328

Browse files
committed
chore: adjusts test fixture to use mock object
1 parent 48f9953 commit cc20328

File tree

1 file changed

+5
-3
lines changed
  • packages/bigframes/tests/unit/core/compile/sqlglot/tpch

1 file changed

+5
-3
lines changed

packages/bigframes/tests/unit/core/compile/sqlglot/tpch/conftest.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ def read_gbq_table_no_snapshot(*args, **kwargs):
157157
kwargs["enable_snapshot"] = False
158158
return original_read_gbq_table(*args, **kwargs)
159159

160-
session._loader.read_gbq_table = read_gbq_table_no_snapshot
161-
162160
session._executor = compiler_session.SQLCompilerExecutor()
163-
return session
161+
162+
with mock.patch.object(
163+
session._loader, "read_gbq_table", new=read_gbq_table_no_snapshot
164+
):
165+
yield session

0 commit comments

Comments
 (0)