File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 2727import bigframes
2828import bigframes .clients
2929import bigframes .core .global_session
30+ import bigframes .core .log_adapter
3031import bigframes .dataframe
32+ import bigframes .session ._io .bigquery
33+ from bigframes .session ._io .bigquery import create_job_configs_labels
3134import bigframes .session .clients
3235
3336"""Utilities for creating test resources."""
@@ -116,6 +119,18 @@ def query_mock(
116119 return query_job
117120
118121 def query_and_wait_mock (query , * args , job_config = None , ** kwargs ):
122+ job_config = (
123+ job_config
124+ if job_config is not None
125+ else google .cloud .bigquery .QueryJobConfig ()
126+ )
127+ api_methods = bigframes .core .log_adapter .get_and_reset_api_methods (
128+ dry_run = job_config .dry_run
129+ )
130+ job_config .labels = create_job_configs_labels (
131+ job_configs_labels = job_config .labels ,
132+ api_methods = api_methods ,
133+ )
119134 queries .append (query )
120135 job_configs .append (copy .deepcopy (job_config ))
121136
You can’t perform that action at this time.
0 commit comments