Skip to content

Commit

Permalink
Fix pip._internal import in tests
Browse files Browse the repository at this point in the history
Missed fixing the import of 'get_installed_distributions' in tests in
the earlier commit.

Also fixed indentation
  • Loading branch information
naiquevin committed Oct 8, 2018
1 parent 086039e commit 51af7dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pipdeptree.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def _get_args():
def main():
args = _get_args()
pkgs = get_installed_distributions(local_only=args.local_only,
user_only=args.user_only)
user_only=args.user_only)

dist_index = build_dist_index(pkgs)
tree = construct_tree(dist_index)
Expand Down
6 changes: 3 additions & 3 deletions tests/virtualenvs/pickle_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
import sys

try:
import pip._internal as pip
from pip._internal.utils.misc import get_installed_distributions
except ImportError:
import pip
from pip import get_installed_distributions


def main():
default_skip = ['setuptools', 'pip', 'python', 'distribute']
skip = default_skip + ['pipdeptree']
pkgs = pip.get_installed_distributions(local_only=True, skip=skip)
pkgs = get_installed_distributions(local_only=True, skip=skip)
pickle.dump(pkgs, sys.stdout)
return 0

Expand Down

0 comments on commit 51af7dd

Please sign in to comment.