Currently pytest always truncates any output string when displaying assertion errors to 240 characters (it is hardcoded in saferepr). This is often a problem, specially in CI (#6682).
#8391 changes how verbosity affects truncation of assertion output, like this:
| Verbosity
| Max chars
|
| 0
| 240
|
| 1
| 240
|
| 2
| 240
|
| 3
| 2400
|
| 4+
| No limit
|
The intent here was to keep the normal -v and -vv (the more common verbosity levels) unchanged, however I have been thinking that perhaps it makes more sense to increase the threshold starting right with -v, like this:
| Verbosity
| Max chars
|
| 0
| 240
|
| 1
| 2400
|
| 2+
| No limit
|
Thoughts?
The logic is that one who is increasing verbosity already expects more output anyway, so it makes sense to increase the threshold limit as well.
cc @ssbarnea
Currently pytest always truncates any output string when displaying assertion errors to 240 characters (it is hardcoded in
saferepr). This is often a problem, specially in CI (#6682).#8391 changes how verbosity affects truncation of assertion output, like this:
The intent here was to keep the normal
-vand-vv(the more common verbosity levels) unchanged, however I have been thinking that perhaps it makes more sense to increase the threshold starting right with-v, like this:Thoughts?
The logic is that one who is increasing verbosity already expects more output anyway, so it makes sense to increase the threshold limit as well.
cc @ssbarnea