Open The-Compiler opened 1 month ago
I don't mind removing it from getting-started.rst
, your reasoning is compelling and I might have gone a bit overboard in adding it there in the first place.
Sounds good to me - let's cut back to the first very simple example, and then just say e.g. "Assertions about expected exceptions explains how to match exception messages or the contents of ExceptionGroup
." so that it's easy to find for anyone who knows they need that.
Motivated by #12880, which proposes adding even more content to the "getting started with pytest" page, intended for teaching the very basics of pytest's functionality:
Personally I think exception groups shouldn't be on a page describing how to write your first test at all. It's not a feature new pytest (and potentially Python) users necessarily need to know about when just starting out. We don't even explain e.g.
match=
forpytest.raises
on that page.If we keep it, at the very least it shouldn't be between an example being shown, and that example being run later...:
But IMHO it has no place there at all, and the How to write and report assertions in tests page already has a very similar explanation, where it does seem to fit in well.
@lanzz @Zac-HD what do you think?