1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import pytest
1516
17+
18+ @pytest .mark .skip (reason = "Documentation sample code snippet" )
1619def test_query_standard_sql ():
1720 # [START bigquery_bigframes_query]
1821 import bigframes .pandas as bpd
@@ -33,9 +36,10 @@ def test_query_standard_sql():
3336 bpd .options .bigquery .project = "your-project-id"
3437 df = bpd .read_gbq (sql )
3538 # [END bigquery_bigframes_query]
36- assert df is not None
39+ return df
3740
3841
42+ @pytest .mark .skip (reason = "Documentation sample code snippet" )
3943def test_query_legacy_sql ():
4044 # [START bigquery_bigframes_query_legacy]
4145 import bigframes .pandas as bpd
@@ -53,9 +57,10 @@ def test_query_legacy_sql():
5357 query_config = {"query" : {"useLegacySql" : True }}
5458 df = bpd .read_gbq (sql , configuration = query_config )
5559 # [END bigquery_bigframes_query_legacy]
56- assert df is not None
60+ return df
5761
5862
63+ @pytest .mark .skip (reason = "Documentation sample code snippet" )
5964def test_query_bqstorage ():
6065 # [START bigquery_bigframes_query_bqstorage]
6166 import bigframes .pandas as bpd
@@ -76,9 +81,10 @@ def test_query_bqstorage():
7681 # automatically uses the BigQuery Storage API if installed.
7782 pandas_df = df .to_pandas ()
7883 # [END bigquery_bigframes_query_bqstorage]
79- assert pandas_df is not None
84+ return pandas_df
8085
8186
87+ @pytest .mark .skip (reason = "Documentation sample code snippet" )
8288def test_query_parameters ():
8389 # [START bigquery_bigframes_query_parameters]
8490 import bigframes .pandas as bpd
@@ -107,9 +113,10 @@ def test_query_parameters():
107113
108114 df = bpd .read_gbq (sql , configuration = query_config )
109115 # [END bigquery_bigframes_query_parameters]
110- assert df is not None
116+ return df
111117
112118
119+ @pytest .mark .skip (reason = "Documentation sample code snippet" )
113120def test_upload_from_dataframe ():
114121 # [START bigquery_bigframes_upload_from_dataframe]
115122 import pandas as pd
@@ -135,4 +142,4 @@ def test_upload_from_dataframe():
135142 table_id = "your-project.your_dataset.your_table_name"
136143 bq_df .to_gbq (table_id , if_exists = "replace" )
137144 # [END bigquery_bigframes_upload_from_dataframe]
138- assert bq_df is not None
145+ return bq_df
0 commit comments