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

Tighten PytestRun coverage plugin. #5542

Merged
merged 1 commit into from
Mar 6, 2018

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented Mar 5, 2018

Re-name coverage plugin classes to reflect their roles and re-name the
coverage plugin module in the pytest binary chroot to avoid the needless
complication of sharing packages with pants code and thus previously
needing namespace packages where none otherwise would be needed.

Addresses feedback in #5534 and #5535

Re-name coverage plugin classes to reflect their roles and re-name the
coverage plugin module in the pytest binary chroot to avoid the needless
complication of sharing packages with pants code and thus previously
needing namespace packages where none otherwise would be needed.
@jsirois jsirois requested review from stuhood and benjyw March 5, 2018 17:23
enclosing_dir = os.path.dirname(__name__.replace('.', os.sep))
plugin_path = os.path.join(enclosing_dir, 'coverage/plugin.py')
yield self.ExtraFile(path=plugin_path,
yield self.ExtraFile(path='{}.py'.format(self.PytestBinary.coverage_plugin_module()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to refer to a different file than it used to... but the tests are passing, so I'm going to assume that that is intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests ride above the layer of the task, they just create it and execute it and so plugin details (for both py.test and coverage) are opaque - though important - to the test. The key paired change to this one is in PytestRun where PytestPrep.PytestBinary.coverage_plugin_module() is used to setup the coverage.rc ini file.

@jsirois jsirois merged commit aa0299d into pantsbuild:master Mar 6, 2018
@jsirois jsirois deleted the issues/5426/follow-ups branch March 6, 2018 15:10
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