#31544: Document input/output capturing utils in django.test.utils
-------------------------------------+-------------------------------------
Reporter: Adam (Chainz) | Owner: nobody
Johnson |
Type: | Status: new
Cleanup/optimization |
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
-------------------------------------+-------------------------------------
Description changed by Tim Graham:
Old description:
> `django.test.utils` contains some useful helpers for input/output
> capturing:
>
> * `captured_stdin`
> * `captured_stderr`
> * `captured_stdout`
>
> These can be useful for testing Django applications too, allowing users
> to avoid reinventing the wheel with `mock.patch`. They've been stable for
> a long time, remaining unchanged since their addition in 5 years ago in
> https://github.com/django/django/commit/6dbe979b4d9396e1b307c7d27388c97c13beb21c
> .
>
> They're copied from Python's `test.support` where they've also not been
> changed in a long time, but this module explicitly makes no backwards
> compatibility guarantees. I think we could help Django users with
> stability and discoverability by making them a public API.
New description:
`django.test.utils` contains some useful helpers for input/output
capturing:
* `captured_stdin`
* `captured_stderr`
* `captured_stdout`
These can be useful for testing Django applications too, allowing users to
avoid reinventing the wheel with `mock.patch`. They've been stable for a
long time, remaining unchanged since their addition in 5 years ago in
6dbe979b4d9396e1b307c7d27388c97c13beb21c (#23930).
They're copied from Python's `test.support` where they've also not been
changed in a long time, but this module explicitly makes no backwards
compatibility guarantees. I think we could help Django users with
stability and discoverability by making them a public API.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31544#comment:2>
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/068.42ec20d0537c1efac1184a941b213c8d%40djangoproject.com.