-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added arbitrary args to InstallOfflineWheel
- Loading branch information
1 parent
63eb35f
commit 3743425
Showing
3 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import pytest | ||
|
||
from installlib.tasks import InstallOfflineWheel | ||
|
||
|
||
def test_install_offline_wheel(mocker): | ||
mock_start_command = mocker.patch("installlib.tasks.start_command") | ||
mock_env = mocker.Mock(return_value=mocker.Mock(activate="activate")) | ||
|
||
path_to_wheel = r"C:\path\to\wheel.whl" | ||
|
||
task = InstallOfflineWheel(path_to_wheel, mock_env) | ||
|
||
task.execute() | ||
|
||
mock_start_command.assert_called_once_with(["activate", "&&", "python", "-m", "pip", "install", "--quiet", path_to_wheel]) | ||
|
||
|
||
def test_install_offline_wheel_extra_args(mocker): | ||
mock_start_command = mocker.patch("installlib.tasks.start_command") | ||
mock_env = mocker.Mock(return_value=mocker.Mock(activate="activate")) | ||
|
||
path_to_wheel = r"C:\path\to\wheel.whl" | ||
|
||
task = InstallOfflineWheel(path_to_wheel, mock_env, args=["--update", "--force-reinstall", "--no-deps"]) | ||
|
||
task.execute() | ||
|
||
mock_start_command.assert_called_once_with(["activate", "&&", "python", "-m", "pip", "install", "--quiet", "--update", "--force-reinstall", "--no-deps", path_to_wheel]) |
This file was deleted.
Oops, something went wrong.