This is an antipattern, even in tests, because the error message you get doesn't say what did happen.
Prompted by seeing output from this pattern in #1694
CC @nickm @jnewsome