-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
tmp_path: basetemp with retention #10829
Comments
that behaviour is basically from about 10-15 years ago, nobody ever sat down and designed a replacement that dont share the downsides i'd like to propose 2 potential solutions
|
How is that different from the existing
I think you have a different use case or modus operandi in mind here, especially the "fail on preexisting folders" seems specific to certain CI/CD workflows, I'm guessing. |
Basetemp stands in for a numbered per test run folder However it nukes whatever it finds there Fail on preexisting is very relevant, it's very easy to accidentally have things run against the wrong folder People have destroyed their source trees or other folders when misusing the option |
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality.
thanks, makes sense now. I guess that this feature request (or any other equivalent improvement) will not be fixed quickly, so I decided to at least document the current behavior better in #12912 |
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality. Also document `PYTEST_DEBUG_TEMPROOT`. Related to #10829 --------- Co-authored-by: Bruno Oliveira <[email protected]>
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality. Also document `PYTEST_DEBUG_TEMPROOT`. Related to #10829 --------- Co-authored-by: Bruno Oliveira <[email protected]> (cherry picked from commit a1a4918)
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality. Also document `PYTEST_DEBUG_TEMPROOT`. Related to #10829 --------- Co-authored-by: Bruno Oliveira <[email protected]> (cherry picked from commit a1a4918) Co-authored-by: Stefaan Lippens <[email protected]>
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality. Also document `PYTEST_DEBUG_TEMPROOT`. Related to pytest-dev#10829 --------- Co-authored-by: Bruno Oliveira <[email protected]>
from the tmp_path how-to docs:
Is there any particular reason that the retention feature (keep 3 by default) is not supported when
--basetemp
is used?It seems like these features should be orthogonal, but that's not the case which is counter-intuitive.
Current workaround is apparently to use the
PYTEST_DEBUG_TEMPROOT
env var instead of--basetemp
but that feature is not documented as far as I could find.I understand that there are concerns about backward compatibility, but I think basetemp+retention can be implented in a backward compatible way:
--basetemp
, but notmp_path_retention_count
config set: use custom temp root without retention (existing behavior)--basetemp
andtmp_path_retention_count
: use custom temp root with retention (this feature request)The text was updated successfully, but these errors were encountered: