Skip to content

Remove exceptiongroups from getting started page? #12883

Description

@The-Compiler

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= for pytest.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...:

image

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?

Activity

  1. added
    type: docsdocumentation improvement, missing or needing clarification
    on Oct 13, 2024
  2. lanzz commented on Oct 13, 2024

    @lanzz
    Contributor

    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.

  3. Zac-HD commented on Oct 13, 2024

    @Zac-HD
    Member

    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.

  4. jakkdl commented on Feb 6, 2025

    @jakkdl
    Member
  5. linked a pull request that will close this issueadd RaisesGroup & Matcher #13192on Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: docsdocumentation improvement, missing or needing clarification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions