MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / test_train_invalid_string_iterations

Function test_train_invalid_string_iterations

lib/cli/tests/test_cli.py:76–84  ·  view source on GitHub ↗
(train_crew, runner)

Source from the content-addressed store, hash-verified

74
75@mock.patch("crewai_cli.cli.train_crew")
76def test_train_invalid_string_iterations(train_crew, runner):
77 result = runner.invoke(train, ["--n-iterations", "invalid"])
78
79 train_crew.assert_not_called()
80 assert result.exit_code == 2
81 assert (
82 "Usage: train [OPTIONS]\nTry 'train --help' for help.\n\nError: Invalid value for '-n' / '--n-iterations': 'invalid' is not a valid integer.\n"
83 in result.output
84 )
85
86
87def test_reset_no_memory_flags(runner):

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected