#27008: allow DEBUG to be enabled when running tests
-----------------------------------+--------------------
     Reporter:  cjerdonek          |      Owner:  nobody
         Type:  New feature        |     Status:  new
    Component:  Testing framework  |    Version:  1.10
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 This ticket is to allow `DEBUG` to be enabled when running tests (or when
 running a subset of tests if passing test labels on the command-line).

 Enabling `DEBUG` is an easy way to help troubleshoot test failures in
 certain situations (e.g. if your code does extra checks or shows more info
 when `DEBUG` is turned on).

 Currently, Django's `DiscoverRunner` hardcodes `settings.DEBUG = False`
 inside `setup_test_environment()`
 
([https://github.com/django/django/blob/5c63b3e5a797102d915e1683971517f747a28013/django/test/runner.py#L414
 here] is a direct link to the code):

 {{{#!python
 def setup_test_environment(self, **kwargs):
     setup_test_environment()
     settings.DEBUG = False
     unittest.installHandler()
 }}}

 One option would be to add a test option like `--debug` to Django's test
 management command.

--
Ticket URL: <https://code.djangoproject.com/ticket/27008>
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.352052043a05c4c570ee92be81faa31f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to