Skip to content

Commit

Permalink
yo
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed May 6, 2024
1 parent 89a9908 commit 2beb86a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions rose/rule_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,17 +484,24 @@ def test_err(rule: str, err: str, matcher: Matcher | None = None) -> None:
)


@pytest.mark.parametrize(
("matcher", "action"),
[("tracktitle:Track", "delete")],
)
def test_rule_parsing_end_to_end_1(matcher: str, action: str) -> None:
assert str(Rule.parse(matcher, [action])) == f"matcher={matcher} action={matcher}/{action}"


@pytest.mark.parametrize(
("matcher", "action"),
[
("tracktitle:Track", "delete"),
(r"tracktitle:\^Track", "delete"),
(r"tracktitle:Track\$", "delete"),
(r"tracktitle:\^Track\$", "delete"),
],
)
def test_rule_parsing_end_to_end_1(matcher: str, action: str) -> None:
assert str(Rule.parse(matcher, [action])) == f"matcher={matcher} action={matcher}/{action}"
def test_rule_parsing_end_to_end_2(matcher: str, action: str) -> None:
assert str(Rule.parse(matcher, [action])) == f"matcher='{matcher}' action='{matcher}/{action}'"


@pytest.mark.parametrize(
Expand All @@ -504,7 +511,7 @@ def test_rule_parsing_end_to_end_1(matcher: str, action: str) -> None:
("tracktitle,genre,trackartist:Track", "tracktitle,genre,artist/delete"),
],
)
def test_rule_parsing_end_to_end_2(matcher: str, action: str) -> None:
def test_rule_parsing_end_to_end_3(matcher: str, action: str) -> None:
assert str(Rule.parse(matcher, [action])) == f"matcher={matcher} action={action}"


Expand Down

0 comments on commit 2beb86a

Please sign in to comment.