Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 1d95d9c

Browse files
committed
testing explicit project with remaining failing tests
1 parent e06d93a commit 1d95d9c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/unit/test_magics.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,8 @@ def test_bigquery_magic_w_progress_bar_type_w_context_setter(monkeypatch):
13561356
run_query_patch = mock.patch(
13571357
"google.cloud.bigquery.magics.magics._run_query", autospec=True
13581358
)
1359+
magics.context.project = "unit-test-project"
1360+
13591361
query_job_mock = mock.create_autospec(
13601362
google.cloud.bigquery.job.QueryJob, instance=True
13611363
)
@@ -1385,6 +1387,8 @@ def test_bigquery_magic_with_progress_bar_type(monkeypatch):
13851387
run_query_patch = mock.patch(
13861388
"google.cloud.bigquery.magics.magics._run_query", autospec=True
13871389
)
1390+
magics.context.project = "unit-test-project"
1391+
13881392
with run_query_patch as run_query_mock:
13891393
ip.run_cell_magic(
13901394
"bigquery", "--progress_bar_type=tqdm_gui", "SELECT 17 as num"
@@ -1567,6 +1571,8 @@ def test_bigquery_magic_with_string_params(ipython_ns_cleanup, monkeypatch):
15671571
run_query_patch = mock.patch(
15681572
"google.cloud.bigquery.magics.magics._run_query", autospec=True
15691573
)
1574+
magics.context.project = "unit-test-project"
1575+
15701576
query_job_mock = mock.create_autospec(
15711577
google.cloud.bigquery.job.QueryJob, instance=True
15721578
)
@@ -1607,6 +1613,8 @@ def test_bigquery_magic_with_dict_params(ipython_ns_cleanup, monkeypatch):
16071613
run_query_patch = mock.patch(
16081614
"google.cloud.bigquery.magics.magics._run_query", autospec=True
16091615
)
1616+
magics.context.project = "unit-test-project"
1617+
16101618
query_job_mock = mock.create_autospec(
16111619
google.cloud.bigquery.job.QueryJob, instance=True
16121620
)
@@ -1691,6 +1699,7 @@ def test_bigquery_magic_with_option_value_incorrect(monkeypatch):
16911699
magics.context.credentials = mock.create_autospec(
16921700
google.auth.credentials.Credentials, instance=True
16931701
)
1702+
magics.context.project = "unit-test-project"
16941703

16951704
sql = "SELECT @foo AS foo"
16961705

@@ -1721,6 +1730,8 @@ def test_bigquery_magic_with_dict_params_negative_value(
17211730
run_query_patch = mock.patch(
17221731
"google.cloud.bigquery.magics.magics._run_query", autospec=True
17231732
)
1733+
magics.context.project = "unit-test-project"
1734+
17241735
query_job_mock = mock.create_autospec(
17251736
google.cloud.bigquery.job.QueryJob, instance=True
17261737
)

0 commit comments

Comments
 (0)