#8401 closed (fixed)
Document : 'django.test.simple.run_tests' - forces settings.DEBUG = False
Reported by: | rishi | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | TEST_RUNNER DEBUG test | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
There doesn't seem to be a documented reason for forcing the settings.DEBUG value to False. The TEST_RUNNER should just use the value specified in the --settings option of the test management command. If there is a good reason to force the setting, it should be doc'd.
Commenting out this line and running this test w/ settings.DEBUG = True seems to work.
Here is the code:
source:/django/trunk/django/test/simple.py#L123
Change History (5)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Component: | Unit test system → Documentation |
---|---|
milestone: | → 1.0 |
Summary: | Default TEST_RUNNER - 'django.test.simple.run_tests' - forces settings.DEBUG = False → Document : 'django.test.simple.run_tests' - forces settings.DEBUG = False |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
milestone: | 1.0 → post-1.0 |
---|
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
There are at least 2 very good reasons for forcing settings DEBUG=False during tests. One is philosophical - your live site should be running with Debug=False, and test conditions should be matching your live site. The second reason is practial - there are some aspects of Django (most notably the handling of errors in templates, but there are others) which can have an effect on the output of tests.
If this isn't documented in the user docs, it should be. Documentation changes are momentarily on hold until the documentation refactor lands in a couple of days, but I'll look into this more when the refactor lands.