-
Notifications
You must be signed in to change notification settings - Fork 65
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
Customize pytest error message #179
Comments
pytest-timeout already announces itself in the reporting header like most other pytest plugins. I'm not sure I'm in favour of adding something like this, it adds maintenance complexity for very little in return. This feels more like a problem that should be solved in your CI pipeline or development communication. |
If maintenance complexity is a concern, what about just changing the error message to be more explicit? |
The proposed message is much better Let's use more obnoxious Exception type names+ expand the message text This is for beginners friendlyness |
I believe @flub just misunderstood the request? Basically just change the message from Seems trivial and indeed better. |
He got it right, I proposed it to be customizable at first. That was an XY problem from my side. |
On Thu, Sep 12, 2024, at 11:49 AM, Pedro Brochado wrote:
> I believe @flub <https://github.com/flub> just misunderstood the request?
>
He got it right, I proposed it to be customizable at first. That was an XY problem from my side.
But yeah, the core request is to have a better error message.
Ahh I'm so sorry, just skimmed the original message.
But I think the change as written before (without customization) would be trivial and a net win.
Cheers,
|
Yeah, if people think the default message and exception types aren't
clear enough that's probably more reasonable to change. Feel free to
propose something, but I'll put some parameters around this:
- It should be short, the section header should definitely render on an
80-columns wide terminal. Should probably aim to look good still in
60 columns.
- It should be consistent with the rest of pytest's default UI.
|
Hey,
I want to request the addition of a setting to change the pytest error message. E.g:
I work on a project made of plugins where the CI is quite complex and often changes.
The pytest-timeout was introduced by the CI team and some test failed due to timeout on the plugin I was looking at.
It took some time to figure out that this was a plugin that was introduced, and a more explicit message would have been helpful.
I can submit a PR if that's ok.
The text was updated successfully, but these errors were encountered: