Import pkg_resources only when necessary.

This commit is contained in:
Raquel Alegre 2016-08-23 16:41:11 +01:00
parent d99ceb1218
commit 2f11a85698
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,6 @@ import traceback
import types
import warnings
import pkg_resources
import py
# DON't import pytest here because it causes import cycle troubles
import sys, os
@ -942,6 +941,7 @@ 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':