8000 test: Add dataframe unit test suite by TrevorBergeron · Pull Request #1751 · googleapis/python-bigquery-dataframes · GitHub
[go: up one dir, main page]

Skip to content

test: Add dataframe unit test suite #1751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 4, 2025
Merged

test: Add dataframe unit test suite #1751

merged 20 commits into from
Jun 4, 2025

Conversation

TrevorBergeron
Copy link
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 as code owners May 23, 2025 20:04
@@ -0,0 +1,4481 @@
# Copyright 2023 Google LLC
Copy link
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
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
Copy link
Contributor
chelsea-lin commented Jun 2, 2025

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?

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
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
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
23 of 24 checks passed
@TrevorBergeron TrevorBergeron deleted the df_local_tests branch June 4, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: xl Pull request size is extra large.
4962
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0