-
Notifications
You must be signed in to change notification settings - Fork 30
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
Update messaging in case splitting is skipped and check for UsageErrors more aggressively #12
Update messaging in case splitting is skipped and check for UsageErrors more aggressively #12
Conversation
We need to able to store state so that we can report on the result of the splitting of the test suite in the corresponding hook. This commit makes the plugin a class without changing existing behaviour.
The pytest_report_collectionfinish is the hook that gets called after item collection. That seems to be the right moment to report on the splitting result. This commit ensures pytest-split always reports how the test were split and uses the same message as before.
@jerry-git I noticed one issue when the user has the plugin installed without passing any pytest-split arguments. Will fix that shortly. |
@jerry-git I updated the MR to fix this. Could you let me know what you think? |
This commit adds two pieces of functionality: 1. verify that neither OR both splits and group are passed 2. verify that the group argument is within valid range
@jerry-git please have another look! |
Please fix the pre-commit errors 🙂 |
Fixed the pre-commit issues |
Hmm, now there's some test failures 🤔 If I understood the tracebacks correctly, should only pass string arguments to |
hmm yes, weird! I'm on it. |
@jerry-git it can you run the workflow again? I pushed a fix. |
Add messaging about split results
This pull request adds functionality to always report on the split results.
When the splitting is skipped for some reason, a message is printed to the terminal.
When the splitting was successful it reports on how the tests were split.