TST: pytest.raises vs. tm.assert_raises_regex · Issue #16521 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I'm wondering whether we should explicitly say in the docs that we prefer tm.assert_raises_regex
over pytest.raises
unless there is no error message to provide. The former is a lot more informative from a dev-perspective as to why certain code should fail.
Thoughts?
(If we can agree that we do prefer the former, I also move to convert some of the tests to use tm.assert_raises_regex
instead of pytest.raises
).