Skip to content

Commit

Permalink
Fixed tests for new-line print param
Browse files Browse the repository at this point in the history
  • Loading branch information
VukW committed Feb 19, 2024
1 parent 498fc9c commit 7f26499
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cli/medperf/tests/ui/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ def test_print_displays_message_through_typer(self, mocker, cli, msg):
cli.print(msg)

# Assert
spy.assert_called_once_with(msg)
spy.assert_called_once_with(msg, nl=True)

@pytest.mark.parametrize("nl", [True, False])
def test_print_typer_new_line(self, mocker, cli, msg, nl):
# Arrange
spy = mocker.patch("typer.echo")

# Act
cli.print(msg, nl=nl)

# Assert
spy.assert_called_once_with(msg, nl=nl)

def test_print_displays_message_through_yaspin_when_interactive(
self, mocker, cli, msg
Expand Down

0 comments on commit 7f26499

Please sign in to comment.