-
Notifications
You must be signed in to change notification settings - Fork 249
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
Issues #146, #147 and #149 #148
Conversation
Fix coverage not failing when forked Make unittest and coverage library functions
ad7aabd
to
df9cf2a
Compare
Thanks for the good catch and even more so for the fix. Can you provide a concrete example use case why it is useful to have coverage as a library function? |
@mriehl definitely! If unit tests can be run multiple times, it is respectively desirable for coverage to be run for those unit tests as well (also with different configurations). Forking of unit tests in addition to coverage provides module reloading isolation between the unit test executions. Using library calls allows an external plugin to invoke unit test and coverage in custom tasks stepping around reactor.execute_task (for example to replace integrationtest plugin with several invocations of unittest calls). It's generally very desirable for all plugins to expose API to be library-call friendly for custom plugins to interface with each other. |
In fact, I'm going to refactor to use "execution_prefix" and "execution_name" for respective arguments. |
This is to align with the concept of "plugin execution" from Maven Closes pybuilder#146, closes pybuilder#147
|
||
|
||
def stop_coverage(coverage, project, logger): | ||
reimport_source_modules(project, logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mriehl shouldn't this line be in start_coverage after start?
Thanks, fantastic work on these issues. Would you consider accepting write privileges on the repo so that it's easier to contribute? |
@mriehl yep, that definitely would be helpful, thanks! |
Fix coverage not failing when forked
Make unittest and coverage library functions