This repository was archived by the owner on Apr 1, 2026. It is now read-only.
test: fix snippets test of using partial ordering mode#1741
Merged
Conversation
shobsi
reviewed
May 15, 2025
| assert "average_body_mass:" in out | ||
|
|
||
| # close session so not to affect other tests | ||
| bigframes.pandas.close_session() |
Contributor
There was a problem hiding this comment.
If the objective is to reset the partially ordered mode to default ordering, I'm afraid that would not happen here, as the value set stills lingers on, and picked up by the next session created
Contributor
Author
There was a problem hiding this comment.
right. reset the option and moved to run_quickstart() where the option is changed.
shobsi
reviewed
May 16, 2025
| model.fit(X, y) | ||
| model.score(X, y) | ||
| # [END bigquery_bigframes_quickstart] | ||
|
|
Contributor
There was a problem hiding this comment.
This is better approach, thanks!. For additional sanity let's restore the original ordering mode. (The reason for this PR is because multiple tests are sharing the global session, in which case we give back what we got).
original_ordering_mode = bpd.options.bigquery.ordering_mode
# [START bigquery_bigframes_quickstart]
...
# [END bigquery_bigframes_quickstart]
bpd.close_session()
bpd.options.bigquery.ordering_mode = original_ordering_mode
shobsi
approved these changes
May 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Fixes #<issue_number_goes_here> 🦕