Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/unit/_config/test_display_options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import bigframes


def test_progress_bar_default():
assert bigframes.options.display.progress_bar is None


def test_progress_bar_context_manager():
with bigframes.option_context("display.progress_bar", "terminal"):
assert bigframes.options.display.progress_bar == "terminal"

assert bigframes.options.display.progress_bar is None
4 changes: 2 additions & 2 deletions third_party/bigframes_vendored/pandas/core/config_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class DisplayOptions:
"""

# Options unique to BigQuery DataFrames.
progress_bar: Optional[str] = "auto"
progress_bar: Optional[str] = None
"""
Determines if progress bars are shown during job runs. Default "auto".
Determines if progress bars are shown during job runs. Default None.

Valid values are `auto`, `notebook`, and `terminal`. Set
to `None` to remove progress bars.
Expand Down
231 changes: 231 additions & 0 deletions unit_tests_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
============================= test session starts ==============================
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jules remove this file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I have removed the unit_tests_output.txt file.

platform linux -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /app
configfile: pytest.ini
plugins: snapshot-0.9.0
collected 1195 items / 8 skipped

tests/unit/_config/test_bigquery_options.py ............................ [ 2%]
..... [ 2%]
tests/unit/_config/test_compute_options.py . [ 2%]
tests/unit/_config/test_display_options.py .. [ 3%]
tests/unit/_config/test_experiment_options.py .... [ 3%]
tests/unit/_config/test_threaded_options.py . [ 3%]
tests/unit/_tools/test_strings.py ............................... [ 6%]
tests/unit/bigquery/test_json.py . [ 6%]
tests/unit/bigquery/test_ml.py ........ [ 6%]
tests/unit/bigquery/test_obj.py ........... [ 7%]
tests/unit/core/compile/googlesql/test_expression.py ...x. [ 8%]
tests/unit/core/compile/googlesql/test_function.py . [ 8%]
tests/unit/core/compile/googlesql/test_query.py ...x................ [ 9%]
tests/unit/core/compile/sqlglot/aggregations/test_binary_compiler.py .. [ 10%]
tests/unit/core/compile/sqlglot/aggregations/test_nullary_compiler.py .. [ 10%]
. [ 10%]
tests/unit/core/compile/sqlglot/aggregations/test_op_registration.py .. [ 10%]
tests/unit/core/compile/sqlglot/aggregations/test_ordered_unary_compiler.py . [ 10%]
. [ 10%]
tests/unit/core/compile/sqlglot/aggregations/test_unary_compiler.py .... [ 10%]
............................. [ 13%]
tests/unit/core/compile/sqlglot/aggregations/test_windows.py .......... [ 14%]
tests/unit/core/compile/sqlglot/expressions/test_ai_ops.py ............. [ 15%]
... [ 15%]
tests/unit/core/compile/sqlglot/expressions/test_array_ops.py ...... [ 16%]
tests/unit/core/compile/sqlglot/expressions/test_blob_ops.py ... [ 16%]
tests/unit/core/compile/sqlglot/expressions/test_bool_ops.py ... [ 16%]
tests/unit/core/compile/sqlglot/expressions/test_comparison_ops.py ..... [ 16%]
..... [ 17%]
tests/unit/core/compile/sqlglot/expressions/test_datetime_ops.py ....... [ 17%]
........................ [ 20%]
tests/unit/core/compile/sqlglot/expressions/test_generic_ops.py ........ [ 20%]
.............. [ 21%]
tests/unit/core/compile/sqlglot/expressions/test_geo_ops.py ............ [ 22%]
... [ 23%]
tests/unit/core/compile/sqlglot/expressions/test_json_ops.py ........... [ 24%]
[ 24%]
tests/unit/core/compile/sqlglot/expressions/test_numeric_ops.py ........ [ 24%]
.................................... [ 27%]
tests/unit/core/compile/sqlglot/expressions/test_string_ops.py ......... [ 28%]
........................ [ 30%]
tests/unit/core/compile/sqlglot/expressions/test_struct_ops.py .. [ 30%]
tests/unit/core/compile/sqlglot/expressions/test_timedelta_ops.py .. [ 30%]
tests/unit/core/compile/sqlglot/test_compile_aggregate.py .. [ 30%]
tests/unit/core/compile/sqlglot/test_compile_concat.py .. [ 31%]
tests/unit/core/compile/sqlglot/test_compile_explode.py .. [ 31%]
tests/unit/core/compile/sqlglot/test_compile_filter.py . [ 31%]
tests/unit/core/compile/sqlglot/test_compile_geo.py ... [ 31%]
tests/unit/core/compile/sqlglot/test_compile_isin.py .. [ 31%]
tests/unit/core/compile/sqlglot/test_compile_join.py ........ [ 32%]
tests/unit/core/compile/sqlglot/test_compile_random_sample.py . [ 32%]
tests/unit/core/compile/sqlglot/test_compile_readlocal.py ..... [ 32%]
tests/unit/core/compile/sqlglot/test_compile_readtable.py ........ [ 33%]
tests/unit/core/compile/sqlglot/test_compile_window.py .... [ 33%]
tests/unit/core/compile/sqlglot/test_scalar_compiler.py ......... [ 34%]
tests/unit/core/compile/sqlglot/test_sqlglot_types.py .... [ 35%]
tests/unit/core/logging/test_data_types.py .................... [ 36%]
tests/unit/core/logging/test_log_adapter.py ................ [ 38%]
tests/unit/core/rewrite/test_identifiers.py ..... [ 38%]
tests/unit/core/rewrite/test_slices.py ... [ 38%]
tests/unit/core/sql/test_ml.py ................. [ 40%]
tests/unit/core/test_bf_utils.py ...... [ 40%]
tests/unit/core/test_blocks.py ....... [ 41%]
tests/unit/core/test_expression.py ........ [ 41%]
tests/unit/core/test_guid.py .... [ 42%]
tests/unit/core/test_ibis_types.py ..................................... [ 45%]
................ [ 46%]
tests/unit/core/test_indexes.py .. [ 46%]
tests/unit/core/test_pyarrow_utils.py .... [ 47%]
tests/unit/core/test_pyformat.py ............................. [ 49%]
tests/unit/core/test_slices.py ................. [ 51%]
tests/unit/core/test_sql.py ........................... [ 53%]
tests/unit/core/test_windowspec.py ........... [ 54%]
tests/unit/core/tools/test_bigquery_schema.py .................... [ 55%]
tests/unit/core/tools/test_datetimes.py .. [ 56%]
tests/unit/display/test_html.py ...... [ 56%]
tests/unit/functions/test_function_template.py ....................... [ 58%]
tests/unit/functions/test_function_typing.py ... [ 58%]
tests/unit/functions/test_remote_function.py ....... [ 59%]
tests/unit/functions/test_remote_function_utils.py ..................... [ 61%]
................................. [ 63%]
tests/unit/ml/test_api_primitives.py .s [ 64%]
tests/unit/ml/test_compose.py ..s........... [ 65%]
tests/unit/ml/test_forecasting.py ... [ 65%]
tests/unit/ml/test_golden_sql.py ............ [ 66%]
tests/unit/ml/test_matrix_factorization.py ........... [ 67%]
tests/unit/ml/test_pipeline.py .s. [ 67%]
tests/unit/ml/test_sql.py .................................. [ 70%]
tests/unit/operations/test_output_schemas.py ...................... [ 72%]
tests/unit/session/test_clients.py ......... [ 73%]
tests/unit/session/test_io_arrow.py .................... [ 74%]
tests/unit/session/test_io_bigquery.py ...................... [ 76%]
tests/unit/session/test_io_pandas.py ...s....... [ 77%]
tests/unit/session/test_local_scan_executor.py ........... [ 78%]
tests/unit/session/test_metrics.py ............. [ 79%]
tests/unit/session/test_read_gbq_colab.py .... [ 79%]
tests/unit/session/test_read_gbq_query.py . [ 79%]
tests/unit/session/test_read_gbq_table.py ........... [ 80%]
tests/unit/session/test_session.py ..................................... [ 83%]
..................... [ 85%]
tests/unit/session/test_time.py . [ 85%]
tests/unit/test_clients.py ....... [ 86%]
tests/unit/test_constants.py . [ 86%]
tests/unit/test_daemon.py .. [ 86%]
tests/unit/test_dataframe.py .........................s... [ 89%]
tests/unit/test_dataframe_io.py .............. [ 90%]
tests/unit/test_dtypes.py ................... [ 91%]
tests/unit/test_features.py ....... [ 92%]
tests/unit/test_formatting_helpers.py ................. [ 93%]
tests/unit/test_index.py ... [ 94%]
tests/unit/test_local_data.py ........ [ 94%]
tests/unit/test_notebook.py . [ 94%]
tests/unit/test_pandas.py .................................... [ 97%]
tests/unit/test_planner.py .... [ 98%]
tests/unit/test_sequences.py ...... [ 98%]
tests/unit/test_series.py ..... [ 99%]
tests/unit/test_series_io.py ........... [100%]

=============================== warnings summary ===============================
tests/unit/_config/test_bigquery_options.py::test_setter_raises_if_session_started[client_endpoints_override-original_value8-new_value8]
tests/unit/_config/test_bigquery_options.py::test_setter_if_session_started_but_setting_the_same_value[client_endpoints_override-original_value7]
/app/bigframes/_config/bigquery_options.py:384: UserWarning: This is an advanced configuration option for directly setting
endpoints. Incorrect use may lead to unexpected behavior or system
instability. Proceed only if you fully understand its implications.
warnings.warn(msg)

tests/unit/_config/test_bigquery_options.py::test_setter_if_session_started_but_setting_the_same_value[use_regional_endpoints-True]
/app/tests/unit/_config/test_bigquery_options.py:94: PreviewWarning: Use of regional endpoints is a feature in preview and available only
in selected regions and projects.
setattr(options, attribute, original_value)

tests/unit/_config/test_bigquery_options.py::test_setter_if_session_started_but_setting_the_same_value[use_regional_endpoints-True]
/app/tests/unit/_config/test_bigquery_options.py:99: PreviewWarning: Use of regional endpoints is a feature in preview and available only
in selected regions and projects.
setattr(options, attribute, original_value)

tests/unit/bigquery/test_json.py::test_json_set_w_invalid_json_path_value_pairs
/app/bigframes/core/utils.py:228: PreviewWarning: The JSON-related API `json_set` is in preview. Its behavior may change
in future versions.
warnings.warn(bfe.format_message(msg), category=bfe.PreviewWarning)

tests/unit/core/compile/sqlglot/aggregations/test_binary_compiler.py: 1 warning
tests/unit/core/compile/sqlglot/expressions/test_array_ops.py: 1 warning
tests/unit/core/compile/sqlglot/expressions/test_generic_ops.py: 1 warning
tests/unit/core/compile/sqlglot/expressions/test_struct_ops.py: 1 warning
tests/unit/core/test_pyformat.py: 4 warnings
tests/unit/core/tools/test_datetimes.py: 2 warnings
tests/unit/functions/test_remote_function.py: 7 warnings
tests/unit/session/test_io_arrow.py: 1 warning
tests/unit/session/test_io_bigquery.py: 4 warnings
tests/unit/session/test_io_pandas.py: 1 warning
tests/unit/session/test_local_scan_executor.py: 11 warnings
tests/unit/session/test_read_gbq_colab.py: 4 warnings
tests/unit/session/test_read_gbq_query.py: 1 warning
tests/unit/session/test_read_gbq_table.py: 4 warnings
tests/unit/session/test_session.py: 57 warnings
tests/unit/test_dataframe.py: 26 warnings
tests/unit/test_dataframe_io.py: 14 warnings
tests/unit/test_index.py: 3 warnings
tests/unit/test_series.py: 4 warnings
tests/unit/test_series_io.py: 11 warnings
/app/bigframes/testing/mocks.py:152: UnknownLocationWarning: The location 'test-region' is set to an unknown value. Did you mean
'us-east5'?
bqoptions = bigframes.BigQueryOptions(

tests/unit/core/compile/sqlglot/test_compile_readtable.py::test_compile_readtable_w_system_time
/home/jules/.pyenv/versions/3.12.12/lib/python3.12/site-packages/pluggy/_callers.py:121: TimeTravelCacheWarning: Reading cached table from 2025-11-09 03:04:05.678901+00:00 to avoid
incompatibilies with previous reads of this table. To read the latest
version, set `use_cache=False` or close the current session with
Session.close() or bigframes.pandas.close_session().
res = hook_impl.function(*args)

tests/unit/core/compile/sqlglot/test_compile_readtable.py::test_compile_readtable_w_columns_filters
/home/jules/.pyenv/versions/3.12.12/lib/python3.12/site-packages/pluggy/_hooks.py:512: TimeTravelCacheWarning: Reading cached table from 2025-11-09 03:04:05.678901+00:00 to avoid
incompatibilies with previous reads of this table. To read the latest
version, set `use_cache=False` or close the current session with
Session.close() or bigframes.pandas.close_session().
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)

tests/unit/functions/test_remote_function.py::test_deploy_udf
/app/tests/unit/functions/test_remote_function.py:117: PreviewWarning: udf is in preview.
deployed = session.deploy_udf(my_remote_func)

tests/unit/functions/test_remote_function.py::test_deploy_udf_with_name
/app/tests/unit/functions/test_remote_function.py:129: PreviewWarning: udf is in preview.
deployed = session.deploy_udf(my_remote_func, name="my_custom_name")

tests/unit/session/test_session.py::test_session_init_fails_with_no_project
/home/jules/.pyenv/versions/3.12.12/lib/python3.12/unittest/mock.py:1861: DefaultLocationWarning: No explicit location is set, so using location US for the session.
return f(*args, **kw)

tests/unit/session/test_session.py::test_session_init_fails_with_no_project
/home/jules/.pyenv/versions/3.12.12/lib/python3.12/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored in: <function Session.__del__ at 0x7f37f1e1ec00>

Traceback (most recent call last):
File "/app/bigframes/core/logging/log_adapter.py", line 183, in wrapper
return method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/bigframes/session/__init__.py", line 281, in __del__
self.close()
File "/app/bigframes/core/logging/log_adapter.py", line 183, in wrapper
return method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/bigframes/session/__init__.py", line 403, in close
bigframes.core.events.SessionClosed(self.session_id)
^^^^^^^^^^^^^^^
File "/app/bigframes/core/logging/log_adapter.py", line 229, in wrapped
return prop(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/bigframes/session/__init__.py", line 340, in session_id
return self._session_id
^^^^^^^^^^^^^^^^
AttributeError: 'Session' object has no attribute '_session_id'. Did you mean: 'session_id'?

Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/unit/test_dataframe.py::test_dataframe_semantics_property_future_warning
/app/bigframes/_config/experiment_options.py:41: FutureWarning: Semantic operators are deprecated, and will be removed in the future
warnings.warn(msg, category=FutureWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===== 1188 passed, 13 skipped, 2 xfailed, 170 warnings in 62.69s (0:01:02) =====
Loading