Moved import pkg_resources to else clause.

This commit is contained in:
Raquel Alegre 2016-08-24 10:25:01 +01:00
parent d3f4b3d14a
commit 8f516d27fa
1 changed files with 1 additions and 1 deletions

View File

@ -941,7 +941,6 @@ class Config(object):
and find all the installed plugins to mark them for re-writing
by the importhook.
"""
import pkg_resources
ns, unknown_args = self._parser.parse_known_and_unknown_args(args)
mode = ns.assertmode
if mode == 'rewrite':
@ -950,6 +949,7 @@ class Config(object):
except SystemError:
mode = 'plain'
else:
import pkg_resources
self.pluginmanager.rewrite_hook = hook
for entrypoint in pkg_resources.iter_entry_points('pytest11'):
for entry in entrypoint.dist._get_metadata('RECORD'):