-
-
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
Implement CLI options to set truncation thresholds #12766
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
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.
Thanks @zhukoff-pavel!
Please take a look at my comments.
Co-authored-by: Bruno Oliveira <[email protected]>
Co-authored-by: Bruno Oliveira <[email protected]>
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 <[email protected]>
….rst Co-authored-by: Bruno Oliveira <[email protected]>
Co-authored-by: Bruno Oliveira <[email protected]>
for more information, see https://pre-commit.ci
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.
Thanks @zhukoff-pavel!
Two minor things still missing, but after that it LGTM! 😁
Thanks for the patience.
Co-authored-by: Bruno Oliveira <[email protected]>
@nicoddemus, thank you for review and ideas! |
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.
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