Skip to content

BUG: make duplicated hashtable test levels distinct - #377

Open
xirafa wants to merge 2 commits into
mainfrom
aryansk/fix/66774-duplicated-hashtable-rng
Open

BUG: make duplicated hashtable test levels distinct#377
xirafa wants to merge 2 commits into
mainfrom
aryansk/fix/66774-duplicated-hashtable-rng

Conversation

@xirafa

@xirafa xirafa commented Aug 15, 2026

Copy link
Copy Markdown

Mirror of pandas-dev/pandas#66786. Runs the pandas test suite through dagz.

Summary by CodeRabbit

  • Tests
    • Improved duplicate-detection test setup by consistently reusing a seeded random generator, ensuring stable and reproducible test data.

test_duplicated_hashtable_impl instantiated a fresh default_rng(2) inside
the comprehension, so every level drew the identical sequence and the
MultiIndex collapsed to only n distinct label tuples. Reuse one generator
across levels so the test exercises duplicate detection over a much wider
input, as it did before #54209.

Closes #66774
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 685bb408-5873-48a1-8cad-9bba827a8f93

📥 Commits

Reviewing files that changed from the base of the PR and between d63f24e and f1589e0.

📒 Files selected for processing (1)
  • pandas/tests/indexes/multi/test_duplicates.py

📝 Walkthrough

Walkthrough

The duplicate-detection test now creates one seeded random generator and reuses it when sampling codes for each level.

Changes

Duplicate detection test

Layer / File(s) Summary
Reuse seeded generator
pandas/tests/indexes/multi/test_duplicates.py
test_duplicated_hashtable_impl reuses one seeded random generator for all level-code sampling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to f1589

This is a narrowly scoped test-only change, and no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main test fix: making duplicated hashtable test levels distinct.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aryansk/fix/66774-duplicated-hashtable-rng

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xirafa
xirafa force-pushed the main branch 10 times, most recently from 3f934fd to 91214ce Compare August 16, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants