-
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.
- Loading branch information
1 parent
91b1cf5
commit c985a7e
Showing
5 changed files
with
10 additions
and
43 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
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 |
---|---|---|
@@ -1,38 +1,4 @@ | ||
import pytest | ||
from click.testing import CliRunner | ||
|
||
from cheeseshop.cli import cli | ||
from cheeseshop.version import VERSION | ||
|
||
|
||
def test_cli(): | ||
runner = CliRunner() | ||
result = runner.invoke(cli.cli, ["--version"]) | ||
assert result.exit_code == 0 | ||
assert VERSION in result.output | ||
|
||
|
||
@pytest.mark.vcr() | ||
def test_cli_info(): | ||
runner = CliRunner() | ||
result = runner.invoke(cli.cli, ["info", "--package", "packaging"]) | ||
assert result.exit_code == 0 | ||
assert "Core utilities for Python packages" in result.output | ||
|
||
|
||
@pytest.mark.vcr() | ||
def test_cli_list_versions(): | ||
runner = CliRunner() | ||
result = runner.invoke( | ||
cli.cli, | ||
[ | ||
"list-versions", | ||
"--package=numpy", | ||
"--python-version=cp38", | ||
"--package-type=bdist_wheel", | ||
"--platform=macos", | ||
"--arch=x86_64", | ||
], | ||
) | ||
assert result.exit_code == 0 | ||
assert "numpy==1.17.3" in result.output | ||
assert True |