Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas committed Jul 19, 2024
1 parent 77881e4 commit 9001e10
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/formatting/test_terminal_string_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
def test_format_with_enum_inputs():
format = Format(color=Color.BLUE, style=[Style.BOLD, Style.UNDERLINE])
formatted_string = format_string("Hello, World!", format)
expected_string = f"{Style.BOLD.value}{Style.UNDERLINE.value}{Color.BLUE.value}Hello, World!{RESET}"
expected_string = f"{Style.BOLD}{Style.UNDERLINE}{Color.BLUE}Hello, World!{RESET}"
assert formatted_string == expected_string


def test_format_with_no_style():
format = Format(color=Color.GREEN, style=[])
formatted_string = format_string("Hello, World!", format)
expected_string = f"{Color.GREEN.value}Hello, World!{RESET}"
expected_string = f"{Color.GREEN}Hello, World!{RESET}"
assert formatted_string == expected_string


def test_format_with_no_color():
format = Format(color=None, style=[Style.BLINK])
formatted_string = format_string("Hello, World!", format)
expected_string = f"{Style.BLINK.value}Hello, World!{RESET}"
expected_string = f"{Style.BLINK}Hello, World!{RESET}"
assert formatted_string == expected_string


Expand Down

0 comments on commit 9001e10

Please sign in to comment.