-
-
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
[REGRESSION] -s
option stops progress from being produced
#11477
Comments
This is intended behavior. From the v3.4.2 changelog:
|
Thanks, I see! But wouldn't it make sense to at least print a message about incompatible options being passed when both options are enabled? Because right now when I use |
…especially so, considering the docs for |
The docs do very much mention this:
Given this line is right below |
Well, yeah, I guess that's because I used the documentation a few point-releases older that google gives me when I query for
Hmm, maybe I'm missing something, I don't know pytest code… But usually you have one large block that parses all options, and you would just add in that block a |
I'm afraid I really don't follow on the "usually" part. I can see nothing usual in behaving differently magically depending on whether an option remains on its default value, or has been set to its default value explicitly. I'd argue that should always be a no-op. It's not that it's not possible to do, but it's very surprising from an user's perspective. |
Sorry for misunderstanding, by "usually" I was referring to the code structure. That part was a reply to your words that one would have to add a whole new separate option a la
I find it doubtful that when a user puts in two conflicting options, they really want some random behavior. "random" because a user clearly made use of the two options expecting to have specific effect for each one, and the lack of effect for either is quite random. Or to put it yet another way: would it be more logical from a user POV if I see it's documented at your link ("loosely documented" I'd add as it only hints at the existence of such behavior), but as a user I find it pretty sad when any software has non-intuitive behavior without any guards, and instead of putting such guards just refers users to the documentation. Generally such stuff ends up being ticking-bomb bugs on the user's side (admittedly though, missing percents is not that bad of a case). |
We recently have finally migrated to newer pytest and found that the progress (controlled by
console_output_style
option) is no longer shown unless you make pytest capture the output (i.e. no-s
option).Last version known where it was working is
3.3.2
Steps to reproduce (in terms of terminal commands)
Expected
On the right side there are percents shown for each test (it's the default setting of
console_output_style
). Like this:Actual
Nothing is shown on the right side.
Workarounds
Replacing
-s
with a--capture=tee-sys
seems to make it work.Additional information
pytest version is
7.4.2
OS: Archlinux
pip list
The text was updated successfully, but these errors were encountered: