Skip to content

chore(grouping): add a test to document cases where parameterization is too aggressive #72051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/sentry/grouping/test_parameterization.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,16 @@ def test_parameterize_regex_experiment_cached_compiled():
)
def test_fail_parameterize(name, input, expected, parameterizer):
assert expected == parameterizer.parameterize_all(input), f"Case {name} Failed"


# These are test cases were we're too aggressive
@pytest.mark.xfail()
@pytest.mark.parametrize(
("name", "input", "expected"),
[
("Not an Int", "Encoding: utf-8", "Encoding: utf-8"), # produces "Encoding: utf<int>"
("Not a Uniq ID", "X-Amz-Apigw-Id", "X-Amz-Apigw-Id"), # produces "<uniq_id>"
],
)
def test_too_aggressive_parameterize(name, input, expected, parameterizer):
assert expected == parameterizer.parameterize_all(input), f"Case {name} Failed"
Loading