Skip to content

Commit 51fa1a4

Browse files
committed
boost a little more coverage
1 parent 700e4ba commit 51fa1a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/test_gbq.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,16 @@ def test_read_gbq_with_no_project_id_given_should_fail(monkeypatch):
456456

457457

458458
def test_read_gbq_with_inferred_project_id_with_query(
459-
monkeypatch, mock_bigquery_client
459+
monkeypatch, mock_bigquery_client, mock_query_job
460460
):
461461
monkeypatch.setattr(
462462
pandas_gbq.features.FEATURES,
463463
"_bigquery_installed_version",
464464
packaging.version.parse(pandas_gbq.features.BIGQUERY_MINIMUM_VERSION),
465465
)
466+
type(mock_query_job).cache_hit = mock.PropertyMock(return_value=False)
467+
type(mock_query_job).total_bytes_billed = mock.PropertyMock(return_value=10_000_000)
468+
type(mock_query_job).total_bytes_processed = mock.PropertyMock(return_value=12345)
466469

467470
df = gbq.read_gbq("SELECT 1", dialect="standard")
468471
assert df is not None

0 commit comments

Comments
 (0)