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

Issues #146, #147 and #149 #148

Merged
merged 4 commits into from
Jul 25, 2015
Merged

Conversation

arcivanov
Copy link
Member

Fix coverage not failing when forked
Make unittest and coverage library functions

Fix coverage not failing when forked
Make unittest and coverage library functions
@mriehl
Copy link
Member

mriehl commented Jul 23, 2015

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?

@arcivanov
Copy link
Member Author

@mriehl definitely!
In Maven, which pybuilder seems to attempt to simulate there is an ability to create several "executions" (https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag) of the same plugin with different configurations that would allow running unit tests or integration tests or packaging with varying parameters in the build cycle.

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.

@arcivanov
Copy link
Member Author

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)
Copy link
Member Author

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?

@arcivanov arcivanov changed the title Closes pybuilder/pybuilder#146 and pybuilder/pybuilder#147 Issues #146, #147, #149 and #150 Jul 25, 2015
mriehl added a commit that referenced this pull request Jul 25, 2015
@mriehl mriehl merged commit 1677721 into pybuilder:master Jul 25, 2015
@mriehl
Copy link
Member

mriehl commented Jul 25, 2015

Thanks, fantastic work on these issues. Would you consider accepting write privileges on the repo so that it's easier to contribute?

@arcivanov
Copy link
Member Author

@mriehl yep, that definitely would be helpful, thanks!

@arcivanov arcivanov changed the title Issues #146, #147, #149 and #150 Issues #146, #147 and #149 Jul 26, 2015
@arcivanov arcivanov deleted the issues_146_147 branch July 26, 2015 07:25
@arcivanov arcivanov restored the issues_146_147 branch July 30, 2015 10:05
@arcivanov arcivanov deleted the issues_146_147 branch July 30, 2015 10:06
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.

None yet

2 participants