forked from python-poetry/poetry
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the
install
command to support groups
- Loading branch information
Showing
5 changed files
with
140 additions
and
13 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
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,19 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def tester(command_tester_factory): | ||
return command_tester_factory("install") | ||
|
||
|
||
def test_group_options_are_passed_to_the_installer(tester, mocker): | ||
""" | ||
Group options are passed properly to the installer. | ||
""" | ||
mocker.patch.object(tester.command.installer, "run", return_value=1) | ||
|
||
tester.execute("--with foo,bar --without baz --without bim --only bam") | ||
|
||
assert tester.command.installer._with_groups == ["foo", "bar"] | ||
assert tester.command.installer._without_groups == ["baz", "bim"] | ||
assert tester.command.installer._only_groups == ["bam"] |
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