#27430: `manage.py test` does not support unittest `-b` buffer option
-------------------------------------+-------------------------------------
Reporter: Paul Tiplady | Owner: Baptiste
| Mispelon
Type: New feature | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Baptiste Mispelon):
* owner: Eyad Toma => Baptiste Mispelon
* has_patch: 0 => 1
* version: 1.10 => master
Comment:
[https://github.com/django/django/pull/12169 PR here]
As noted in the PR, I couldn't figure out how to make the option work when
running the tests in parallel.
Python's unittest implements the `--buffer` feature on its 'TestResult`
class but Django reimplements that class from scratch in the case of
parallel tests.
It might be possible to re-add all the stdout/stderr manupulation that
Python does but even then I'm not sure how modifying `sys.stdout` would
interact with `multiprocessing` (is it safe to do so?).
I didn't add any tests because I couldn't find examples in the existing
test suite of how to construct a test case for this behavior.
(I used #30676 as a base to build this PR and it didn't come with tests
either, but maybe that one was harder to test so it's more justified than
for this ticket)
--
Ticket URL: <https://code.djangoproject.com/ticket/27430#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/069.11b99f9c8180290a0e0a17504fd61d6a%40djangoproject.com.