diff options
| author | Kevin Kubasik <kevin@kubasik.net> | 2009-07-01 10:39:52 +0000 |
|---|---|---|
| committer | Kevin Kubasik <kevin@kubasik.net> | 2009-07-01 10:39:52 +0000 |
| commit | b5ea9f6ad5ff42ee8b7c87e43388b62a2a94cbb0 (patch) | |
| tree | fd4d69b55e7bf1a6f3788f486eba33db8697265c /tests/runtests.py | |
| parent | 1ed1ac22fee3613155f1da198c89f3d6149233fe (diff) | |
| download | django-b5ea9f6ad5ff42ee8b7c87e43388b62a2a94cbb0.tar.gz | |
[gsoc2009-testing] Import windmill imports before starting coverage, this fixes some module load issues
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/test-improvements@11140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/runtests.py')
| -rwxr-xr-x | tests/runtests.py | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 3b4e7fbeb9..9fa238ac6f 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -185,10 +185,19 @@ def django_tests(verbosity, interactive, test_labels): # Default number of failures is 0 failures = 0 - + if do_windmill: + # Our bank of windmill-specific imports. Only loaded when used. + import types + import logging + import threading + from windmill.conf import global_settings + from windmill.authoring import setup_module, teardown_module + from django.core.management.commands.test_windmill import ServerContainer, attempt_import + from django.test.windmill_tests import WindmillDjangoUnitTest + from django.db.models.loading import remove_model #Run the appropriate test runner based on command line params. - if(do_std): - if(do_coverage): + if do_std: + if do_coverage: test_runner = get_runner(settings, coverage=True, reports=True) else: test_runner = get_runner(settings, coverage=False, reports=False) @@ -201,17 +210,6 @@ def django_tests(verbosity, interactive, test_labels): #Run windmill tests if --windmill parameter was passed. if do_windmill: - # Our bank of windmill-specific imports. Only loaded when used. - import types - import logging - import threading - from windmill.conf import global_settings - from windmill.authoring import setup_module, teardown_module - from django.core.management.commands.test_windmill import ServerContainer, attempt_import - from django.test.windmill_tests import WindmillDjangoUnitTest - from django.db.models.loading import remove_model - - # We don't want to try and parse models that we know are invalid. remove_model('invalid_models') |
