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

Update messaging in case splitting is skipped and check for UsageErrors more aggressively #12

Merged
merged 10 commits into from
Jun 8, 2021
Merged

Update messaging in case splitting is skipped and check for UsageErrors more aggressively #12

merged 10 commits into from
Jun 8, 2021

Conversation

mbkroese
Copy link

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.

Maurits Kroese added 2 commits May 18, 2021 21:41
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.
@mbkroese mbkroese changed the title Mbkroese/add messages when not splitting Add messages about splitting in case of success and when skipped May 18, 2021
@jerry-git jerry-git self-requested a review May 19, 2021 16:48
@mbkroese
Copy link
Author

@jerry-git I noticed one issue when the user has the plugin installed without passing any pytest-split arguments. Will fix that shortly.

@mbkroese
Copy link
Author

mbkroese commented May 28, 2021

@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?

tests/test_plugin.py Outdated Show resolved Hide resolved
tests/test_plugin.py Outdated Show resolved Hide resolved
mbk added 5 commits June 5, 2021 15:30
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
@mbkroese mbkroese changed the title Add messages about splitting in case of success and when skipped Update messaging in case splitting is skipped and check for UsageErrors more aggressively Jun 5, 2021
@mbkroese
Copy link
Author

mbkroese commented Jun 5, 2021

@jerry-git please have another look!

@jerry-git
Copy link
Owner

Please fix the pre-commit errors 🙂

@mbkroese
Copy link
Author

mbkroese commented Jun 7, 2021

Fixed the pre-commit issues

@jerry-git
Copy link
Owner

Hmm, now there's some test failures 🤔 If I understood the tracebacks correctly, should only pass string arguments to example_suite.inline_run in the tests 🙂

@mbkroese
Copy link
Author

mbkroese commented Jun 8, 2021

hmm yes, weird! I'm on it.

@mbkroese
Copy link
Author

mbkroese commented Jun 8, 2021

@jerry-git it can you run the workflow again? I pushed a fix.

@jerry-git jerry-git merged commit d2674a0 into jerry-git:master Jun 8, 2021
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.

3 participants