-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Improve docs on basetemp and retention #12912
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
Improve docs on basetemp and retention #12912
Conversation
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality.
Note that this PR introduces the exposure of the Lines 157 to 158 in 26215b8
I'm not sure if that is desired. Maybe it's only intended as internal implementation detail for testing purposes. However, I think it's pretty valuable to have this a tool to finetune the "temproot" in practice (e.g. as discussed in #10829 as well) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looks much better, thanks!
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
a concern here is that this env var contains "DEBUG" in it's name, which makes it look like it's not ready for production use. As a user I'm not interested to use this for one-off debug use cases, I want to use this in real CI contexts. Is there opportunity to rename this env var to, for example, |
Regardless if we want to rename or not, we should document the existing var -- renaming it should be discussed in a separate issue. |
I'm suggesting the rename here as it seems less cumbersome to do a rename before it making a publicly documented feature than the other way around. |
FYI I'm just assuming |
but indeed, regardless, you still have to document something like
|
You are right in your assumption, but it seems it is used in the wild: https://github.com/search?q=PYTEST_DEBUG_TEMPROOT&type=code So we do need to document it regardless, even if we were to change it later (which I don't think is something worthwhile to do). |
Thanks @soxofaan, looks great! I will leave it open for a few more days to give others a chance to chime in. 👍 |
Backport to 8.3.x: 💚 backport PR created✅ Backport PR branch: Backported as #12928 🤖 @patchback |
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 <bruno@soliv.dev> (cherry picked from commit a1a4918) Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
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 <bruno@soliv.dev>
Improve coverage of current handling of
--basetemp
option and its lack of retention functionality.[ ] Include documentation when adding new features.[ ] Include new tests or update existing tests when applicable.closes #XYZW
to the PR description and/or commits (whereXYZW
is the issue number). See the github docs for more information.changelog
folder, with a name like<ISSUE NUMBER>.<TYPE>.rst
. See changelog/README.rst for details.AUTHORS
in alphabetical order.Addresses (part of) issue #10829:
the
--basetemp
option and the default retention feature can not be combined currently. This is completely unclear from the current docs. While I initially requested to allow the combination of retention with--basetemp
in #10829, this PR just attempts better document the current behavior.