Skip to content

Commit

Permalink
Rename Executor.run() to Executor.run_pip()
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Jul 3, 2020
1 parent 617ea4a commit 2859016
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _increment_operations_count(self, operation, executed):

self._lock.release()

def run(self, *args, **kwargs): # type: (...) -> str
def run_pip(self, *args, **kwargs): # type: (...) -> str
return self._env.run("python", "-m", "pip", *args, **kwargs)

def get_operation_message(self, operation, done=False):
Expand Down Expand Up @@ -360,7 +360,7 @@ def _install(self, operation):
if operation.job_type == "update":
args.insert(2, "-U")

self.run(*args)
self.run_pip(*args)

def _update(self, operation):
return self._install(operation)
Expand All @@ -375,7 +375,7 @@ def _remove(self, operation):
safe_rmtree(str(src_dir))

try:
self.run("uninstall", package.name, "-y")
self.run_pip("uninstall", package.name, "-y")
except CalledProcessError as e:
if "not installed" in str(e):
return
Expand Down Expand Up @@ -464,14 +464,14 @@ def _install_directory(self, operation):

args.append(req)

return self.run(*args)
return self.run_pip(*args)

if package.develop:
args.append("-e")

args.append(req)

return self.run(*args)
return self.run_pip(*args)

def _install_git(self, operation):
from poetry.core.vcs import Git
Expand Down
2 changes: 1 addition & 1 deletion tests/console/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def setup(mocker, installer, installed, config, env):
p.return_value = installer

# Do not run pip commands of the executor
mocker.patch("poetry.installation.executor.Executor.run")
mocker.patch("poetry.installation.executor.Executor.run_pip")

p = mocker.patch("poetry.installation.installer.Installer._get_installed")
p.return_value = installed
Expand Down

0 comments on commit 2859016

Please sign in to comment.