Skip to content

Commit 190b8dc

Browse files
committed
Simplify test
1 parent 4f4302c commit 190b8dc

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

tests/test_plugin.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,9 @@ def test_argparser_to_markdown_with_no_color(sample_parser: argparse.ArgumentPar
8989

9090
def 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

0 commit comments

Comments
 (0)