import pytest from rich.color import Color, ColorType from rich import errors from rich.style import Style, StyleStack def test_str(): assert str(Style()) == "none" assert str(Style(bold=True)) == "bold" assert str(Style(color="red", bold=True)) == "bold red" assert ( str( Style( color="red", bgcolor="black", bold=True, dim=True, italic=True, underline=True, blink=True, blink2=True, reverse=True, conceal=True, strike=True, ) ) == "bold dim italic underline blink blink2 reverse conceal strike red on black" ) assert str(Style(link="foo")) == "link foo" def test_repr(): assert repr(Style(bold=True, color="red")) == '