mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
* 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
21 lines
560 B
Python
21 lines
560 B
Python
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
|
|
)
|