Child: #2876 (uses the new maybe_raises / verify_logs functionality, this was factored from there)
Changes:
maybe_raises can be passed a str (to match against an error message, regardless of error type) or an (exc, msg) tuple (to match against error type as well as message. As before, this is useful for tests where some cases expect no error, while others want to verify an error's class and/or message.
tests._util.verify_logs helper, which can verify presence of expected log messages, given a pytest "caplog" fixture
Issue and/or context:
maybe_raises
/verify_logs
functionality, this was factored from there)Changes:
maybe_raises
can be passed astr
(to match against an error message, regardless of error type) or an(exc, msg)
tuple (to match against error type as well as message. As before, this is useful for tests where some cases expect no error, while others want to verify an error's class and/or message.tests._util.verify_logs
helper, which can verify presence of expected log messages, given a pytest "caplog" fixture