Skip to content

Commit

Permalink
add stdout assertion to test_app
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Fiddy committed Dec 19, 2024
1 parent 94c3f97 commit 6352b90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def test_app():
) as mock_calculate_optimal_voltages,
):
mock_calculate_optimal_voltages.return_value = np.array([72.14, 50.98, 18.59])
runner.invoke(app, ["calculate-voltages", "tests/data/raw_data.csv"])
result = runner.invoke(app, ["calculate-voltages", "tests/data/raw_data.csv"])
mock_np_save.assert_called_once()
mock_calculate_optimal_voltages.assert_called_with("tests/data/raw_data.csv")
assert "The optimal voltages are: [72.14, 50.98, 18.59]" in result.stdout


def test_cli_version():
Expand Down

0 comments on commit 6352b90

Please sign in to comment.