[Django] #31543: Default output buffering on in tests

21 views
Skip to first unread message

Django

unread,
May 6, 2020, 5:52:47 AM5/6/20
to django-...@googlegroups.com
#31543: Default output buffering on in tests
-------------------------------------------------+------------------------
Reporter: Adam (Chainz) Johnson | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------------+------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/31543>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 11, 2020, 1:35:32 PM5/11/20
to django-...@googlegroups.com
#31543: Default output buffering on in tests
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: nobody
Johnson |

Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ahmad Abdallah):

+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 debugging print statement can be easily dealt with by using the
--no-buffer option.

This will remove a lot of unnecessary clutter.

--
Ticket URL: <https://code.djangoproject.com/ticket/31543#comment:1>

Django

unread,
May 11, 2020, 1:37:52 PM5/11/20
to django-...@googlegroups.com
#31543: Default output buffering on in tests
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: nobody
Johnson |
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmad Abdallah):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31543#comment:2>

Django

unread,
Jul 27, 2020, 8:50:18 AM7/27/20
to django-...@googlegroups.com
#31543: Default output buffering on in tests
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner:
Johnson | alyyasser19
Type: New feature | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by alyyasser19):

* owner: nobody => alyyasser19
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31543#comment:3>

Django

unread,
Apr 20, 2021, 5:15:20 AM4/20/21
to django-...@googlegroups.com
#31543: Default output buffering on in tests
-----------------------------------+--------------------------------------
Reporter: Adam Johnson | Owner: Aly yasser
Type: New feature | Status: closed
Component: Testing framework | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* cc: Carlton Gibson (added)
* status: assigned => closed
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

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.)

--
Ticket URL: <https://code.djangoproject.com/ticket/31543#comment:4>

Reply all
Reply to author
Forward
0 new messages