Reindent and add docstring

This commit is contained in:
Jason R. Coombs 2017-05-20 04:21:08 -04:00
parent 6d2e11b7d1
commit ce0ff0040f
1 changed files with 23 additions and 18 deletions

View File

@ -999,6 +999,11 @@ class Config(object):
self._warn_about_missing_assertion(mode)
def _mark_plugins_for_rewrite(self, hook):
"""
Given an importhook, mark for rewrite any top-level
modules or packages in the distribution package for
all pytest plugins.
"""
import pkg_resources
self.pluginmanager.rewrite_hook = hook
for entrypoint in pkg_resources.iter_entry_points('pytest11'):