Skip to content

Explicit note that tmpdir fixture is discouraged in favour of tmp_path #9937

Description

@timhoffm

While https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html#the-tmpdir-and-tmpdir-factory-fixtures` mentions "These days, prefer to use tmp_path and tmp_path_factory", it's quite hidden in the text.

I propose to announce this more loudly using a note admonition. Additionally the note admonition should be placed in the docstrings:

The same holds for tmpdir_factory.

Activity

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

    good first issueeasy issue that is friendly to new contributortype: 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