File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2823,6 +2823,27 @@ def test_perror_no_style(base_app, capsys) -> None:
28232823 assert err == msg + end
28242824
28252825
2826+ @with_ansi_style (ru .AllowStyle .ALWAYS )
2827+ def test_psuccess (outsim_app ) -> None :
2828+ msg = 'testing...'
2829+ end = '\n '
2830+ outsim_app .psuccess (msg )
2831+
2832+ expected = su .stylize (msg + end , style = Cmd2Style .SUCCESS )
2833+ assert outsim_app .stdout .getvalue () == expected
2834+
2835+
2836+ @with_ansi_style (ru .AllowStyle .ALWAYS )
2837+ def test_pwarning (base_app , capsys ) -> None :
2838+ msg = 'testing...'
2839+ end = '\n '
2840+ base_app .pwarning (msg )
2841+
2842+ expected = su .stylize (msg + end , style = Cmd2Style .WARNING )
2843+ _out , err = capsys .readouterr ()
2844+ assert err == expected
2845+
2846+
28262847@with_ansi_style (ru .AllowStyle .ALWAYS )
28272848def test_pexcept_style (base_app , capsys ) -> None :
28282849 msg = Exception ('testing...' )
You can’t perform that action at this time.
0 commit comments