diff options
Diffstat (limited to 'cli/tests')
| -rw-r--r-- | cli/tests/test_cli_backtest.py | 1 | ||||
| -rw-r--r-- | cli/tests/test_cli_portfolio.py | 1 | ||||
| -rw-r--r-- | cli/tests/test_cli_service.py | 1 | ||||
| -rw-r--r-- | cli/tests/test_cli_strategy.py | 7 |
4 files changed, 9 insertions, 1 deletions
diff --git a/cli/tests/test_cli_backtest.py b/cli/tests/test_cli_backtest.py index 84227a9..80f516c 100644 --- a/cli/tests/test_cli_backtest.py +++ b/cli/tests/test_cli_backtest.py @@ -1,4 +1,5 @@ """Tests for backtest CLI commands.""" + from click.testing import CliRunner from trading_cli.main import cli diff --git a/cli/tests/test_cli_portfolio.py b/cli/tests/test_cli_portfolio.py index 351b49f..19be0cb 100644 --- a/cli/tests/test_cli_portfolio.py +++ b/cli/tests/test_cli_portfolio.py @@ -1,4 +1,5 @@ """Tests for portfolio CLI commands.""" + from click.testing import CliRunner from trading_cli.main import cli diff --git a/cli/tests/test_cli_service.py b/cli/tests/test_cli_service.py index 08cd396..dbc5889 100644 --- a/cli/tests/test_cli_service.py +++ b/cli/tests/test_cli_service.py @@ -1,4 +1,5 @@ """Tests for service CLI commands.""" + from click.testing import CliRunner from trading_cli.main import cli diff --git a/cli/tests/test_cli_strategy.py b/cli/tests/test_cli_strategy.py index 3c89477..cf3057b 100644 --- a/cli/tests/test_cli_strategy.py +++ b/cli/tests/test_cli_strategy.py @@ -1,4 +1,5 @@ """Tests for strategy CLI commands.""" + from unittest.mock import patch, MagicMock from click.testing import CliRunner from trading_cli.main import cli @@ -44,4 +45,8 @@ def test_strategy_info_unknown(): runner = CliRunner() result = runner.invoke(cli, ["strategy", "info", "--name", "nonexistent"]) # Should handle gracefully (exit 0 or 1 with message) - assert "not found" in result.output.lower() or result.exit_code != 0 or "nonexistent" in result.output + assert ( + "not found" in result.output.lower() + or result.exit_code != 0 + or "nonexistent" in result.output + ) |
