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

Document temp dir retention in how-to guide #11789

Closed
faph opened this issue Jan 8, 2024 · 0 comments · Fixed by #11830
Closed

Document temp dir retention in how-to guide #11789

faph opened this issue Jan 8, 2024 · 0 comments · Fixed by #11830

Comments

@faph
Copy link
Contributor

faph commented Jan 8, 2024

I discovered by accident Pytest's feature to retain temporary directories by default after tests complete. I feel the how-to guide "How to use temporary directories and files in tests" (https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html) could do with documenting this feature as this may be the first and only page a developer reads before using the tmp_path fixture.

Currently, the documentation simply refers to "a temporary directory unique to the test (...)". As an engineer, I read that as something that goes away automatically as soon as the fixture is being tore down.

This may be an issue when using large temporary files, for example, in automated pipelines.

I don't mind what wording is used, but a reference to the API reference docs (e.g. https://docs.pytest.org/en/7.3.x/reference/reference.html#confval-tmp_path_retention_policy) might be extremely useful.

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 a pull request may close this issue.

1 participant