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

Commit a7a3f8c

Browse files
committed
fix: Localize BigQuery log suppression for gbq.py
1 parent 69fe317 commit a7a3f8c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

conftest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import pyarrow as pa
2222
import pytest
2323

24-
import bigframes._config
25-
2624
# Make sure SettingWithCopyWarning is ignored if it exists.
2725
# It was removed in pandas 3.0.
2826
if hasattr(pd.errors, "SettingWithCopyWarning"):
@@ -54,7 +52,6 @@ def default_doctest_imports(doctest_namespace, polars_session_or_bpd):
5452
doctest_namespace["pd"] = pd
5553
doctest_namespace["pa"] = pa
5654
doctest_namespace["bpd"] = polars_session_or_bpd
57-
bigframes._config.options.display.progress_bar = None
5855

5956
# TODO(tswast): Consider setting the numpy printoptions here for better
6057
# compatibility across numpy versions.

third_party/bigframes_vendored/pandas/io/gbq.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def read_gbq(
7272
7373
Preserve ordering in a query input.
7474
75+
>>> bpd.options.display.progress_bar = None
7576
>>> df = bpd.read_gbq('''
7677
... SELECT
7778
... -- Instead of an ORDER BY clause on the query, use
@@ -86,9 +87,11 @@ def read_gbq(
8687
... WHERE year = 2016
8788
... GROUP BY pitcherFirstName, pitcherLastName
8889
... ''', index_col="rowindex")
89-
>>> df.head(2)
90+
>>> print("START_OF_OUTPUT"); df.head(2) # doctest: +ELLIPSIS,+NORMALIZE_WHITESPACE
91+
START_OF_OUTPUT
92+
...
9093
pitcherFirstName pitcherLastName averagePitchSpeed
91-
rowindex
94+
...
9295
1 Albertin Chapman 96.514113
9396
2 Zachary Britton 94.591039
9497
<BLANKLINE>

0 commit comments

Comments
 (0)