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

test: Add dataframe unit test suite#1751

Merged
TrevorBergeron merged 20 commits into
mainfrom
df_local_tests
Jun 4, 2025
Merged

test: Add dataframe unit test suite#1751
TrevorBergeron merged 20 commits into
mainfrom
df_local_tests

Conversation

@TrevorBergeron

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels May 19, 2025
@TrevorBergeron
TrevorBergeron marked this pull request as ready for review May 23, 2025 20:04
@TrevorBergeron
TrevorBergeron requested review from a team and chelsea-lin May 23, 2025 20:04
@@ -0,0 +1,4481 @@
# Copyright 2023 Google LLC

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.

Does this file contain context same as tests/system/small/test_dataframe.py? If so, can we reduce code redundancy?

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.

Its a slightly smaller set of tests (maybe like 80% of them?) with some slightly modified validations (eg, stop counting executions). Can unify, but goal is to eventually delete the system test versions of these tests.

@chelsea-lin

chelsea-lin commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

The unit-test coverage is decreased from 49% into 46% (link). Could you please investigate reasons. Some clues from the report:

tests/unit/test_dataframe_polars.py                           1995   1977     46      0     1%   42-4479
tests/unit/test_local_engine.py                                 89     82      0      0     8%   24-206

I am wondering if tests in test_dataframe_polars.py and test_local_engine.py are triggered? If not, why the report does not count them?

Comment thread noxfile.py
if extras:
if install_test_extra:
if session.python in UNIT_TEST_EXTRAS_BY_PYTHON:
extras = UNIT_TEST_EXTRAS_BY_PYTHON[session.python]

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.

iiuc, this branch should be like
extras = [**UNIT_TEST_EXTRAS_BY_PYTHON[session.python], **UNIT_TEST_EXTRAS].

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.

eh, UNIT_TEST_EXTRAS_BY_PYTHON should just be full override like for the system verison, so added 'tests' to it in new revision now

@TrevorBergeron
TrevorBergeron merged commit 1d45646 into main Jun 4, 2025
@TrevorBergeron
TrevorBergeron deleted the df_local_tests branch June 4, 2025 20:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants