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

Exception during test collection results in ZeroDivisionError #4

Open
jerry-git opened this issue Nov 17, 2020 · 0 comments
Open

Exception during test collection results in ZeroDivisionError #4

jerry-git opened this issue Nov 17, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@jerry-git
Copy link
Owner

In short, this:
pytest --splits 3 --group 1

results in this

File "/home/user/.venv/lib/python3.8/site-packages/pytest_split/plugin.py", line 114, in _calculate_suite_start_and_end_idx
    avg_duration_per_test = sum(stored_durations.values()) / len(stored_durations)
ZeroDivisionError: division by zero

if there's e.g. some ImportError during test collection.

The ZeroDivisionError hides the original exception.

@jerry-git jerry-git added the bug Something isn't working label Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant