diff --git a/bigquery/google/cloud/bigquery/magics.py b/bigquery/google/cloud/bigquery/magics.py index 7b55deda3f32..9b1543d7b69b 100644 --- a/bigquery/google/cloud/bigquery/magics.py +++ b/bigquery/google/cloud/bigquery/magics.py @@ -266,6 +266,7 @@ def default_query_job_config(self, value): context = Context() + def _print_error(error, destination_var=None): if destination_var: print( @@ -274,6 +275,7 @@ def _print_error(error, destination_var=None): ) print("\nERROR:\n", error, file=sys.stderr) + def _run_query(client, query, job_config=None, max_results=None): """Runs a query while printing status updates diff --git a/bigquery/tests/unit/test_magics.py b/bigquery/tests/unit/test_magics.py index 6d397b739ca1..53d1d228f686 100644 --- a/bigquery/tests/unit/test_magics.py +++ b/bigquery/tests/unit/test_magics.py @@ -695,6 +695,7 @@ def test_bigquery_magic_w_max_results_valid_calls_queryjob_result(): query_job_mock.result.assert_called_once_with(timeout=0.5, max_results=5) + def test_bigquery_magic_w_table_id_invalid(): ip = IPython.get_ipython() ip.extension_manager.load_extension("google.cloud.bigquery")