File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,17 +89,9 @@ def test_argparser_to_markdown_with_no_color(sample_parser: argparse.ArgumentPar
8989
9090def test_argparser_to_markdown_with_color (monkeypatch : pytest .MonkeyPatch , sample_parser : argparse .ArgumentParser ):
9191 monkeypatch .setenv ("FORCE_COLOR" , "1" )
92- styles = RichArgparseStyles ()
93- # Use custom color
94- styles ["args" ] = "gold1" # #ffd700 at https://rich.readthedocs.io/en/stable/appendix/colors.html
95- styles .apply () # pyright: ignore[reportAttributeAccessIssue]
9692
9793 result = argparser_to_markdown (sample_parser , heading = "My Program CLI" )
9894
9995 assert len (result ) > 3500
100- # gold color for args, default of RichHelpFormatter
101- assert '<span style="color: #ffd700; text-decoration-color: #ffd700">' in result
102- # green color for descriptions, default of RichArgparseStyles
103- assert '<span style="color: #008000; text-decoration-color: #008000">' in result
104- # dark orange for groups
96+ assert '<span style="color: #008080; text-decoration-color: #008080">' in result
10597 assert '<span style="color: #ff8700; text-decoration-color: #ff8700">' in result
You can’t perform that action at this time.
0 commit comments