Repository navigation
Preserve duplicate collected items in grouped scheduling - #1383
Open
AdemVessell wants to merge 1 commit into
Open
AdemVessell wants to merge 1 commit into
AdemVessell wants to merge 1 commit into
Conversation
AdemVessell
force-pushed
the
fix/grouped-collection-occurrences
branch
from
December 3, 2026 01:47
385531b to
c2db44e
Compare
This branch has not been deployed
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.
Preserve duplicate collected items in grouped scheduling
With
--keep-duplicates, pytest can collect the same test path more than once.loadscope,loadfile, andloadgrouppreviously keyed their internal workunits by nodeid, so duplicate occurrences collapsed to one item. Dispatch also
recovered positions with repeated
list.index()searches.This current-main-based update keeps each collection index through grouping,
dispatch, completion, and worker replacement, while retaining nodeids for
grouping and crash-report text. The worker protocol and public scheduler hook
signatures are unchanged.
Added regression coverage verifies both ordinary completion and unfinished-work
redistribution after a worker restart, plus subprocess coverage that runs two
explicit duplicate occurrences through all three grouped schedulers.
Local current-base verification on macOS ARM64: Python 3.12.13 / pytest 9.1.1 /
execnet 2.1.2. Relevant suite: 66 passed and 2 expected xfails, including all
9 new regression cases. Ruff, mypy, and
git diff --checkpassed. Theunmodified current master reproduced one pass for each grouped scheduler; the
repaired tree reproduced two passes. Windows and current pytest-main remain
unverified for this update; earlier CI applies only to earlier revisions. No
claim of maintainer acceptance, full matrix coverage, or benchmark speedup is
made here.
Prepared with AI assistance; no independent human review is claimed.