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

The number of generated groups can be different than test-group-count #17

Open
lucasmbrown opened this issue Dec 7, 2019 · 0 comments · May be fixed by wchill/pytest-split-tests#8
Open

Comments

@lucasmbrown
Copy link

lucasmbrown commented Dec 7, 2019

Due to the math in the following method:


def get_group_size(total_items, total_groups):
    """Return the group size."""
    return int(math.ceil(float(total_items) / total_groups))

This can return a group_size that leads to all tests being included in a group before the last one or two groups are reached, which then creates a Invalid test-group argument error. This came up for me because we have a lot of tests split into a lot of groups.

For instance, assume we have 2001 tests split into 200 groups: so float(total_items) / total_groups)= 10.1. Taking the ceiling and integer, that's 11. But 11*199=2,189, so the 200th group will have no tests.

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 a pull request may close this issue.

1 participant