Skip to content

Commit

Permalink
boost a little more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast committed Jan 10, 2024
1 parent 700e4ba commit 51fa1a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,16 @@ def test_read_gbq_with_no_project_id_given_should_fail(monkeypatch):


def test_read_gbq_with_inferred_project_id_with_query(
monkeypatch, mock_bigquery_client
monkeypatch, mock_bigquery_client, mock_query_job
):
monkeypatch.setattr(
pandas_gbq.features.FEATURES,
"_bigquery_installed_version",
packaging.version.parse(pandas_gbq.features.BIGQUERY_MINIMUM_VERSION),
)
type(mock_query_job).cache_hit = mock.PropertyMock(return_value=False)
type(mock_query_job).total_bytes_billed = mock.PropertyMock(return_value=10_000_000)
type(mock_query_job).total_bytes_processed = mock.PropertyMock(return_value=12345)

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

0 comments on commit 51fa1a4

Please sign in to comment.