Skip to content
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

Add warning for an empty group in the message string #12338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olwenya
Copy link

@olwenya olwenya commented May 18, 2024

Closes #10478.

@olwenya
Copy link
Author

olwenya commented May 18, 2024

@Zac-HD please review my PR

@Zac-HD
Copy link
Member

Zac-HD commented May 18, 2024

👋 hey @olwenya, it was lovely to meet you at the mentored sprint!

There are a few things we'll need to do before we merge, listed in https://docs.pytest.org/en/stable/contributing.html#preparing-pull-requests - the next steps are probably

  • write a test which ensures that we get the warning we expect, when we expect it
  • write a changelog entry
  • consider factoring this out into a validate_regex_pattern() helper, so that we can also use it in e.g. pytest.raises() and pytest.warns().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn on impossible-to-match message pattern in filterwarnings - likely user error
2 participants