@@ -758,3 +758,49 @@ def test_rich_to_pt_style_nounderline(self):
758758 style = Style (underline = False )
759759 pt_style = pt_utils .rich_to_pt_style (style )
760760 assert "nounderline" in pt_style
761+
762+ def test_rich_to_pt_style_blink (self ):
763+ from rich .style import Style
764+
765+ style = Style (blink = True )
766+ pt_style = pt_utils .rich_to_pt_style (style )
767+ assert "blink" in pt_style
768+
769+ def test_rich_to_pt_style_noblink (self ):
770+ from rich .style import Style
771+
772+ style = Style (blink = False )
773+ pt_style = pt_utils .rich_to_pt_style (style )
774+ assert "noblink" in pt_style
775+
776+ def test_rich_to_pt_style_reverse (self ):
777+ from rich .style import Style
778+
779+ style = Style (reverse = True )
780+ pt_style = pt_utils .rich_to_pt_style (style )
781+ # Note: reverse replaces the default 'noreverse' that is added at the start of parts
782+ # wait, we'll check how it works exactly. It will append "reverse". So we just assert "reverse" in pt_style
783+ # actually, if reverse=True, "reverse" will be appended to the list, while "noreverse" is also at index 0.
784+ # Let's just check the last appended one.
785+ assert "reverse" in pt_style .split ()
786+
787+ def test_rich_to_pt_style_noreverse (self ):
788+ from rich .style import Style
789+
790+ style = Style (reverse = False )
791+ pt_style = pt_utils .rich_to_pt_style (style )
792+ assert "noreverse" in pt_style
793+
794+ def test_rich_to_pt_style_hidden_conceal (self ):
795+ from rich .style import Style
796+
797+ style = Style (conceal = True )
798+ pt_style = pt_utils .rich_to_pt_style (style )
799+ assert "hidden" in pt_style
800+
801+ def test_rich_to_pt_style_nohidden_conceal (self ):
802+ from rich .style import Style
803+
804+ style = Style (conceal = False )
805+ pt_style = pt_utils .rich_to_pt_style (style )
806+ assert "nohidden" in pt_style
0 commit comments