test: regression tests for #892, #881, #876#1063
Merged
Conversation
All three bugs were resolved in prior PRs; add regression tests to prevent future regressions: - #892: safe_merge() must not mutate caller's right DataFrame - #881: chain hop tag fillna must not emit FutureWarning - #876: bool label__ column filter must not raise GFQLSchemaError Closes #892 Closes #881 Closes #876 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds TEST_CUDF=1-gated variants: - safe_merge: cuDF right DataFrame not mutated (same dtype, mismatched dtype, empty float64-inferred right — the original #892 trigger) - chain hop: no FutureWarning on fillna with cuDF DataFrames (#881) - bool label__ filter: no GFQLSchemaError with cuDF nodes (#876) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aac745f to
8ff2403
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
All three bugs were already fixed in prior PRs. This PR adds regression tests (pandas + cuDF) to lock in the correct behavior and prevent future regressions, then closes the issues.
safe_mergemutation):TestSafeMergeNoMutation— assertsrightDataFrame dtype and values are unchanged aftersafe_merge()for both pandas and cuDF, including the original trigger (empty cuDF float64-inferred right DataFrame)fillna):TestChainFillnaNoFutureWarning— runs a hop chain insidewarnings.catch_warnings(simplefilter='error', FutureWarning)for both pandas and cuDFlabel__filter):TestBoolLabelPredicate/TestBoolLabelPredicateCuDF— assertsn({'label__A': True})works correctly on bool-dtype columns for both enginesValidation
Closes #892
Closes #881
Closes #876
Test plan
python3.10 -m pytest graphistry/tests/compute/test_dataframe_primitives.py graphistry/tests/compute/test_gfql_exceptions.py— 24 passed, 8 skipped (cuDF skipped without TEST_CUDF=1)TEST_CUDF=1 pytest ...— 32 passed🤖 Generated with Claude Code