pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Add warning for an empty group in the message string

Open olwenya opened this issue 1 year ago • 2 comments

Closes https://github.com/pytest-dev/pytest/issues/10478.

olwenya avatar May 18 '24 18:05 olwenya

@Zac-HD please review my PR

olwenya avatar May 18 '24 18:05 olwenya

👋 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().

Zac-HD avatar May 18 '24 19:05 Zac-HD