Implement CLI options to set truncation thresholds#12766
Implement CLI options to set truncation thresholds#12766nicoddemus merged 33 commits intopytest-dev:mainfrom
Conversation
|
Thanks @zhukoff-pavel, we appreciate the PR! I would like to see what other maintainers think of this feature, overall I'm +1 on it, the only downside I see is the cognitive load of extra options... but perhaps others have different opinions here. I also wonder if this is better implemented as an ini option instead... seems like it would be more common to set this in the config file in test suites where this feature is often wanted (and of course it is always pass this using the |
|
@nicoddemus, thank you for your reply!
Maybe it is better to implement an Is it possible to implement such behaviour with current option reading machinery (with some combination of |
Your suggestion makes sense, however we have for awhile moved away from this because:
For this reason nowadays we prefer to have either a command-line option (for features where users are likely to change between pytest invocations) or an ini option (where users are most likely to set once per repository).
Unfortunately no, it requires duplicating the code. |
|
I see. Thank you for a quick reply! |
Thanks! I suggest to wait a bit in case some other maintainer has comments or reservations about the feature though. |
|
Been awhile and nobody seems to be against the idea, so feel free to go ahead. |
for more information, see https://pre-commit.ci
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks @zhukoff-pavel!
Please take a look at my comments.
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
for more information, see https://pre-commit.ci
|
@nicoddemus , thank you for a thorough review! Please have a look at the changes. I implemented some logic regarding value of |
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
….rst Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
for more information, see https://pre-commit.ci
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks @zhukoff-pavel!
Two minor things still missing, but after that it LGTM! 😁
Thanks for the patience.
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
|
@nicoddemus, thank you for review and ideas! |
nicoddemus
left a comment
There was a problem hiding this comment.
Thanks a lot @zhukoff-pavel, appreciate the patience! 👍
Leaving this open for awhile in case anybody else wants to review it, otherwise I will merge it soon.
closes #12765
Example implementation of truncation limit setting with CLI flags