Skip to content

Documentation: setup and teardown aren't mentioned #9549

@alfredodeza

Description

@alfredodeza

While browsing the current release docs on "xunit-style" support, specifically the usage of setup and tearing down (cleanup) of tests, I was surprised not to see setup() and teardown() mentioned. Instead, the documentation points out that for methods, one must use setup_method() and teardown_method().

I've always used setup() and teardown() methods for setting up and cleaning up before and after each test method in a class for production code as well as teaching Pytest.

Are those methods deprecated and shouldn't be used? Supported by mistake? Or is it an omission in the docs? Either way the docs need to be rectified for correctness. I'm happy to provide a PR with the right path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions