Skip to content

Commit

Permalink
rename tests for clarity and add one more nested phase for deep nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mchok committed Nov 13, 2024
1 parent da361bb commit a25569c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/api/console/test_cli_console_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ def test_error_messages(cli_console, capsys):
def test_phase_nesting(cli_console, capsys):
with cli_console.phase("Enter 1"):
with cli_console.phase("Enter 2"):
pass
with cli_console.phase("Enter 3"):
pass

expected_output = dedent(
f"""\
Enter 1
Enter 2
Enter 3
"""
)

Expand All @@ -98,7 +100,7 @@ def test_phase_is_cleaned_up_on_exception(cli_console):
pass


def test_phase_with_indent(cli_console, capsys):
def test_phase_inside_indented(cli_console, capsys):
cli_console.step("Outside of Indent")
with cli_console.indented():
with cli_console.phase("Enter"):
Expand All @@ -114,7 +116,7 @@ def test_phase_with_indent(cli_console, capsys):
assert_output_matches(expected_output, capsys)


def test_step_with_indent(cli_console, capsys):
def test_step_inside_indented(cli_console, capsys):
cli_console.step("Outside of Indent")
with cli_console.indented():
cli_console.step("Operation")
Expand Down

0 comments on commit a25569c

Please sign in to comment.