Skip to content

Commit

Permalink
Moved import pkg_resources to else clause.
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalegre committed Aug 24, 2016
1 parent d3f4b3d commit 8f516d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _pytest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ def _consider_importhook(self, args, entrypoint_name):
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':
Expand All @@ -950,6 +949,7 @@ def _consider_importhook(self, args, entrypoint_name):
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'):
Expand Down

0 comments on commit 8f516d2

Please sign in to comment.