Opened 5 years ago
Closed 5 years ago
#31543 closed New feature (wontfix)
Default output buffering on in tests
| Reported by: | Adam Johnson | Owned by: | Aly yasser |
|---|---|---|---|
| Component: | Testing framework | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Baptiste Mispelon, Carlton Gibson | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Following #31370, the --buffer option is supported for both parallel and non-parallel tests.
I think we should default to turning it *on* for all users, and provide a --no-buffer option to disable this behaviour.
This will improve output for many users, and increase speed for those projects whose tests currently print a lot of output. It has the risk of breaking some workflows of extracting information from tests ˙using print(), but since the output is only hidden for passing tests, I think this should be fairly niche.
Change History (4)
comment:2 by , 5 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 5 years ago
| Cc: | added |
|---|---|
| Resolution: | → wontfix |
| Status: | assigned → closed |
| Triage Stage: | Accepted → Unreviewed |
IMO we shouldn't change the current behavior, it's consistent with Python's unittest. Folks who are concerned here can add the --buffer flag (it's not much of a burden.)
+1 on making this change. As already pointed out, eliminating unnecessary output will increase the speed of running tests. The associated risk of not seeing a print statement can be easily dealt with by using the --no-buffer option.
This will remove a lot of unnecessary clutter.