mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-06-18 04:23:31 +08:00
* stash some changes * add more robust testing * mypy * point PR at V5 * introduce spec file * codespell * test fix * fix workflow environment setup * fix workflow environment setup * fix workflow environment setup * add pyyaml to dependencies * split lint jobs * fix workflow environment setup * fix workflow environment setup * workflow env setup * workflow env setup * clean up code comments * add auth hook entrypoints * codespell * add codegen feature * codespell * move _unpack into dispatchers for consistency with codegen packages * surface nested models in the response * fix missing coverage in CI * socrata updates * test fix * detect plotly output * add --include and --exclude flags from generate-extension command * cap test matrix at python 3.14 * no useless comments * platform controller command description split * merge URL overloads from path params * exclude none and unset from model dump --------- Co-authored-by: deeleeramone <> Co-authored-by: Copilot <copilot@github.com>
25 lines
761 B
Python
25 lines
761 B
Python
"""Test the CLI controller integration."""
|
|
|
|
from openbb_cli.controllers.cli_controller import (
|
|
CLIController,
|
|
)
|
|
|
|
|
|
def test_parse_input_valid_commands():
|
|
"""Test parse_input method."""
|
|
controller = CLIController()
|
|
input_string = "exe --file test.openbb"
|
|
expected_output = ["exe --file test.openbb"]
|
|
assert controller.parse_input(input_string) == expected_output
|
|
|
|
|
|
def test_parse_input_invalid_commands():
|
|
"""Test parse_input method."""
|
|
controller = CLIController()
|
|
input_string = "nonexistentcommand args"
|
|
expected_output = ["nonexistentcommand args"]
|
|
actual_output = controller.parse_input(input_string)
|
|
assert actual_output == expected_output, (
|
|
f"Expected {expected_output}, got {actual_output}"
|
|
)
|