-
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.
* CLI: `version` -> `--version` * Test the CLI
- Loading branch information
Showing
3 changed files
with
33 additions
and
9 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[project] | ||
name = "ptah-cli" | ||
readme = "README.md" | ||
version = "0.5.2" | ||
version = "0.6.0" | ||
authors = [ | ||
{ name = "Dan Miller", email = "[email protected]" } | ||
] | ||
|
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,7 +1,19 @@ | ||
import re | ||
|
||
from click import BaseCommand | ||
from typer.testing import CliRunner | ||
|
||
from ptah.cli import app | ||
|
||
|
||
def test_cli_click_object(): | ||
from ptah.cli import ptah | ||
|
||
assert isinstance(ptah, BaseCommand) | ||
|
||
|
||
def test_cli_version(): | ||
runner = CliRunner() | ||
result = runner.invoke(app, ["--version"]) | ||
assert result.exit_code == 0 | ||
assert re.match(r"\d+\.\d+\.\d+", result.stdout) |