#19885: Make all testing tools importable from django.test
--------------------------------------+------------------------------------
     Reporter:  akaariai              |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   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 carljm):

 * stage:  Unreviewed => Accepted


Comment:

 We backported unittest2 into the Django codebase as
 `django.utils.unittest` because it is only available in the standard
 library of Python 2.7+. When we drop support for Python 2.6, we will get
 rid of `django.utils.unittest` entirely. I wouldn't have any problem with
 importing a common utility like `skipIf` into `django/test/__init__.py` in
 parallel with the other skip-related utilities imported there; that will
 actually reduce the amount of search and replace we have to do when we
 switch from using `django.utils.unittest` to stdlib `unittest`.

 Similarly I'd be fine importing `override_settings` (and anything else
 from `django.test.utils` that is commonly used) into
 `django/test/__init__.py`.

 I don't feel quite so good about doing that with `parse_html`; HTML-
 parsing is a separate niche that many tests don't need, it makes sense to
 me to keep that segregated in `django.test.html`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19885#comment:1>
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to