Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Clarify temporary directory location and retention #11830

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

faph
Copy link
Contributor

@faph faph commented Jan 17, 2024

Fixes #11789 and #11790

You can use the ``tmp_path`` fixture which will provide a temporary directory
unique to each test function.

By default, ``pytest`` retains the temporary directory for the last 3 ``pytest``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, I would just move this to the end of this session (before line 69), as this seems more like a detail best left for after we explain how to use the fixture.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and updated.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicoddemus nicoddemus merged commit eefc9d4 into pytest-dev:main Jan 18, 2024
24 checks passed
@faph faph deleted the docs/tmp-dir-retention branch January 18, 2024 11:50
@faph
Copy link
Contributor Author

faph commented Jan 18, 2024

Awesome. Thanks @nicoddemus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document temp dir retention in how-to guide
2 participants