pytest
pytest copied to clipboard
Add warning for an empty group in the message string
Closes https://github.com/pytest-dev/pytest/issues/10478.
@Zac-HD please review my PR
👋 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()andpytest.warns().