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

Configurability of temp directory cleanup #8410

Open
nedbat opened this issue Mar 7, 2021 · 1 comment
Open

Configurability of temp directory cleanup #8410

nedbat opened this issue Mar 7, 2021 · 1 comment
Labels
topic: fixtures anything involving fixtures directly or indirectly type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature

Comments

@nedbat
Copy link
Contributor

nedbat commented Mar 7, 2021

Currently, pytest always deletes temp directories made with the tmpdir or tmp_path fixture, and always keeps the latest three.

I run tox, which runs 20 pytest invocations. Occasionally I would like to be able to keep all of the temp dirs from these runs. One workaround is to define --basetemp to be the tox temp directory. But the parameters of temp cleanup seems like an obvious thing to make configurable.

@Zac-HD Zac-HD added topic: fixtures anything involving fixtures directly or indirectly type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature labels Mar 7, 2021
@soxofaan
Copy link
Contributor

FYI: PR #10442 (issue #8141) added tmp_path retention finetuning options as defined in #8141 (comment)

This feature is however not yet in a released version as far as I can see (latest release is 7.2.2 atm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: fixtures anything involving fixtures directly or indirectly type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature
Projects
None yet
Development

No branches or pull requests

3 participants