Skip to content
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

Handle case where remaining groups are empty #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bburgin
Copy link

@bburgin bburgin commented Aug 25, 2021

Similar to this issue mark-adams#17, but for the the pytest-split-tests module:
I want to avoid the "Invalid test-group argument" error for cases where the remaining group is empty, due to the item count and group_count yielding a group_size that does not evenly distribute across all the groups of the group_count. Example:
item count = 2001
group_count = 200
group_size is then 11
and the last 18 groups are empty
When iterating over the 18 empty groups, I don't want the pytest-split-tests plugin to fail out.
I want it to instead just run no tests for these groups.

@wchill
Copy link
Owner

wchill commented Sep 1, 2021

Seems like #2 also was an old attempt at addressing this issue, but instead of leaving empty groups it would distribute the work better so that there were no empty groups. Wouldn't that be a better approach?

@bburgin
Copy link
Author

bburgin commented Sep 2, 2021

This pull request is smaller and does not change the existing distribution behavior. I agree that the other pull request adds more value, but it changes more behavior. Also since the other pull request was not accepted, I figured I would attempt a simpler fix for the issue I was getting.

@rivershah
Copy link

Can this please be merged

@ekrako
Copy link

ekrako commented Jul 24, 2022

please merge it, without it it breaks testing

@rjeffman
Copy link

Any chance that this PR gets merged?

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.

5 participants