-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add version command to cli with tools flag * test: check output of version and tools flag * fix: add version tool info to cli outputs
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 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,20 @@ | ||
from click.testing import CliRunner | ||
from crewai.cli.cli import version | ||
|
||
|
||
def test_version_command(): | ||
runner = CliRunner() | ||
result = runner.invoke(version) | ||
assert result.exit_code == 0 | ||
assert "crewai version:" in result.output | ||
|
||
|
||
def test_version_command_with_tools(): | ||
runner = CliRunner() | ||
result = runner.invoke(version, ["--tools"]) | ||
assert result.exit_code == 0 | ||
assert "crewai version:" in result.output | ||
assert ( | ||
"crewai tools version:" in result.output | ||
or "crewai tools not installed" in result.output | ||
) |