mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Refs #2333 - Re-added the template rendering signal for testing purposes; however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import unittest, doctest
|
||||
from django.conf import settings
|
||||
from django.core import management
|
||||
from django.test.utils import setup_test_environment, teardown_test_environment
|
||||
from django.test.utils import create_test_db, destroy_test_db
|
||||
from django.test.testcases import OutputChecker, DocTestRunner
|
||||
|
||||
@@ -51,6 +52,7 @@ def run_tests(module_list, verbosity=1, extra_tests=[]):
|
||||
the module. A list of 'extra' tests may also be provided; these tests
|
||||
will be added to the test suite.
|
||||
"""
|
||||
setup_test_environment()
|
||||
|
||||
settings.DEBUG = False
|
||||
suite = unittest.TestSuite()
|
||||
@@ -66,3 +68,5 @@ def run_tests(module_list, verbosity=1, extra_tests=[]):
|
||||
management.syncdb(verbosity, interactive=False)
|
||||
unittest.TextTestRunner(verbosity=verbosity).run(suite)
|
||||
destroy_test_db(old_name, verbosity)
|
||||
|
||||
teardown_test_environment()
|
||||
|
||||
Reference in New Issue
Block a user